What do you think is better using : $state.go or $location.path?
My animation doesn't work with state.go but do with $location.path.
Does any one know why?
Thanks!
You can use the module ngAnimate
instead of ngClass
directive to animate view/state changes. The module adds specific css classes on elements which changes. To see animations in action, you must only define the appropriate CSS classes
Here you can find an small introduction how this with the ui-router module works.
UPDATE
Sorry for the delay... There is no reason why this shouldn't work. The UI-router plugin internally call $state.go()
when $location.path
changed.
See the forked plunker how $state.go()
works in combination with ngAnimate
module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With