angular.js - How to add switching animation when switching templates through $window.location.href in ionic?
伊谢尔伦2017-05-15 17:03:52
0
2
716
I know that when jumping through the a tag, adding nav-direction="back" can have a switching animation. Now I use $window.location.href = '#/block' to do the switching in the controller. In this case, how to do the switching animation?
Solution:
Use
$state.go
进行跳转,记得在controller里注入'$state'
, then refer to this link to use animationRemember to jump to the page, you can use $state.go