css - Animating content children in Angular (2/4) -
i have component uses <ng-content>
selector pull in content children.
<!-- label-expand component--> <div> <ng-content select="[applabel]"></ng-content> </div>
so when component creates instance of label-expand component this:
<label-expand> <span applabel>some label</span> </label-expand>
i set label-expand component, when hovered on play animation of content child applabel
directive text gets bigger.
@component({ selector: 'label-expand', //..., animations: [trigger('expandlabelstate', [ //this animation pass content child ])] }) export class labelexpandcomponent { @contentchild(applabeldirective) applabel: applabeldirective }
how pass animation defined angular animation metadata in label-expand
component it's ng-content content child? or problem should instead solved css?
Comments
Post a Comment