Page transition animations with Angular 2.0 router and component interface promises
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: In Angular 1.x we can use ngAnimate to detect when we are leaving or entering a particular route. Furthermore we are able to apply behaviors to them: animateApp . animation ( '.myElement' , function (){ return { enter : function ( element , done ) { //Do something on enter }, leave : function ( element , done ) { //Do something on leave } }; )}; Resulting in a product like this: http://embed.plnkr.co/uW4v9T/preview I would like to do something similar with Angular 2.0 and I feel like I'm pretty close... So here goes, I've created a