An example of Angular 2 animation ended callback function

后端 未结 2 544
傲寒
傲寒 2021-01-01 19:14

I am trying to create a function that will be triggered at the end of an animation in Angular 2 (I am using the latest angular cli).

I have been on the Angular Anima

2条回答
  •  我在风中等你
    2021-01-01 19:16

    Now Angular2's supported (@animation.start) and (@animation.done) to tap into animation events.

    For example, you can use (@routeAnimation.start)=onStart($event), (@routeAnimation.done)=onDone($event) in the first.component.html.

    You can find out more at here.

    Also you can see a simple example with the first.component.ts on Plunker.

    Hope this help!

提交回复
热议问题