bergben / ng2-page-transition

Simple Angular2 component to create a page transition animation on route changes
MIT License
41 stars 7 forks source link

zone.js:642 Unhandled Promise rejection: Cannot read property 'play' of undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read property 'play' of undefined #11

Closed preservance717 closed 7 years ago

preservance717 commented 7 years ago

zone.js:642 Unhandled Promise rejection: Cannot read property 'play' of undefined ; Zone: ; Task: Promise.then ; Value: TypeError: Cannot read property 'play' of undefined. problem That‘s why?

bergben commented 7 years ago

Hey there @preservance717 ,

could it be that you are using Angular 4.x? This package only works for Angular 2.x. Another idea is that you may be using a custom animation, which is invalid and doesn't work...

preservance717 commented 7 years ago

yes,i am using Angular4.x. yes, i am using a custom animation-pagination. but i don't know the reason that it doesn't work.

bergben commented 7 years ago

If you are using Angular 4.x it's all clear. This package does not support Angular 4.x as Angular 4.x allows route transitions way cleaner and smoother than this package does. Please refer to the Readme: https://github.com/bergben/ng2-page-transition#works-for-angular-2x-only-angular-42-supports-route-transitions-built-in or for more detailed information: https://github.com/bergben/ng2-page-transition/issues/8

I hope this helps :)