homerjam / angular-gsapify-router

Angular UI-Router animation directive allowing configuration of GSAP state transitions based on priority
http://homerjam.github.io/angular-gsapify-router/
MIT License
85 stars 16 forks source link

Ui router 1.0 Support #28

Closed luncht1me closed 6 years ago

luncht1me commented 6 years ago

AngularJS ui-router 1.0+ uses $transition events instead of the old $stateChangeSuccess, etc.

Modified the code to use these events / objects instead. Haven't completely tested all of gsapify-ui-router functionality, but have managed to fix some glaring bugs presented by the change in ui-router.

My main reason for doing this, was leave: blocks on the states in ui-router 1.0+ would not be used. Therefore, I could not properly animate a leaving view. Because of this, my exiting view on every transition would just simply disappear, resulting in a blank page with the new view coming in.

This patch fixes basic compatibility for ui-router 1.0+, properly using the animations provided by the leave: blocks for states, allowing for animation of exiting views again, as originally intended.

homerjam commented 6 years ago

Woooot! Thanks!

I've been meaning to get round to this : )