Angular Animations : How to bind animation trigger name dynamically in the template?
I would like to know if there is a way to bind the animation trigger name dynamically in the template. Here is the div to animate in the template app.component.html : <div [@animationTriggerName]> ... </div> Here is the app.module.ts : ... @NgModule({ imports: [...], declarations: [ ..., AnimationTriggerNameDirective ], bootstrap: [...] }) And here is the app.component.ts : @Component({ ... }) export class AppComponent { ... animationTriggerName = 'slideInOut'; } @Directive({ selector: '[animationTriggerName]' }) export class AnimationTriggerNameDirective { @Input() animationTriggerName: