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