angular-animations icon indicating copy to clipboard operation
angular-animations copied to clipboard

How to achieve the following with your library?

Open anandchakru opened this issue 5 years ago • 1 comments

// html
<span [@fadeAnimTrigger]="wordIndex">{{words[wordIndex]}}</span>

// ts
animations: [
    trigger('fadeAnimTrigger', [
      transition(':decrement', [
        style({ opacity: 0 }), animate('500ms', style({ opacity: 1 }))
      ]),
      transition(':increment', [
        style({ opacity: 0 }), animate('500ms', style({ opacity: 1 }))
      ]),
    ])

I'm trying to replace style({ opacity: 0 }), animate('500ms', style({ opacity: 1 })) in the above code with your fadeIn

anandchakru avatar Oct 22 '19 05:10 anandchakru

Hi @anandchakru, It's an interesting use case. Currently the library doesn't support :increment and :decrement selectors. I'll have a look how we could incorporate similar use cases to the library.

In the example you posted, the animation for :increment and :decrement are the same, so maybe you can do sth like in this Stackblitz example

filipows avatar Oct 28 '19 03:10 filipows