search

Home  >  Q&A  >  body text

angular.js - How to add switching animation when switching templates through $window.location.href in ionic?

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?

伊谢尔伦伊谢尔伦2783 days ago718

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-05-15 17:05:52

    Solution:
    Use $state.go进行跳转,记得在controller里注入'$state', then refer to this link to use animation

    reply
    0
  • PHP中文网

    PHP中文网2017-05-15 17:05:52

    Remember to jump to the page, you can use $state.go

    reply
    0
  • Cancelreply