Angular 2 Animate - No visible effect of the '* => void' transition when changing routes/components

倾然丶 夕夏残阳落幕 提交于 2019-11-30 03:45:33

问题


Using the Angular 2 Animate (RC2), with the help of official Docs, and the code used by Matias in the month old ng-conf animate video on YT channel.

I got everything working except the most crucial part:

I cannot seem to get the leaving transition/animation going when changing routerlinks/components. Using the '* => void' does not do anything. The router destroys the components in view without any regard to the animate leaving transition and introduces the new routerlink/component.

I get the entering animations to work, but not the leaving one.

I presume that router is not automatically detecting that there is a leaving animation for the component ( something similar to ng-leave ng-leave-active ), and thus I am missing a step, which is not a hack preferably.

All the plunker examples, official one and the ng-conf Matias one, are showing it all without any router interactions: all the enter/leave states & transitions examples are within the same component.

** Edit::: [Plunker Demo Here] http://plnkr.co/edit/IJoaB7ifVPJqX0NrUIpV

You will notice that even though the transitions '* => void' are specified, the router link changing completely ignores it

There is still basically no posts on ng2 animate so this is the only way.

Thank you for your time reading this. Appreciate the help.

来源:https://stackoverflow.com/questions/37904860/angular-2-animate-no-visible-effect-of-the-void-transition-when-changin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!