The @Component
annotation provides us with an animations
property. This can be used to define a list of triggers
each with a lot of state
and transition
properties.
When you add multiple animations to a component, this list can become pretty long. Also some animations would be really nice to use in other components as well. Having to put them directly in each component seems tedious and is repetitive - plus it violates the DRY principle.
You can define the template and styles properties on your component as well, but here you have the option of providing a templateUrl
and styleUrls
instead. I can't seem to find an animationUrls
property - am i missing something - is there a way to do this?