本文主要是介绍ionic中$ionicView 事件的执行顺序,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
原文:http://www.luacloud.com/2016/ionic%E4%B8%ADionicview%E7%9A%84%E6%89%A7%E8%A1%8C%E9%A1%BA%E5%BA%8F.html
1 2 3 4 5 6 7 8 | $ ionicView . loaded $ ionicView . beforeEnter $ ionicView . enter $ ionicView . afterEnter $ ionicView . beforeLeave $ ionicView . leave $ ionicView . afterLeave $ ionicView . unloaded |
代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | $ scope . $ on ( '$ionicView.loaded' , function ( ) { console . log ( "$ionicView.loaded" ) ; } ) ; $ scope . $ on ( '$ionicView.beforeEnter' , function ( ) { console . log ( "$ionicView.beforeEnter" ) ; } ) ; $ scope . $ on ( "$ionicView.enter" , function ( ) { console . log ( "$ionicView.enter" ) ; } ) ; $ scope . $ on ( '$ionicView.afterEnter' , function ( ) { console . log ( "$ionicView.afterEnter" ) ; } ) ; $ scope . $ on ( '$ionicView.beforeLeave' , function ( ) { console . log ( "$ionicView.beforeLeave" ) ; } ) ; $ scope . $ on ( '$ionicView.leave' , function ( ) { console . log ( "$ionicView.leave" ) ; } ) ; $ scope . $ on ( '$ionicView.afterLeave' , function ( ) { console . log ( "$ionicView.afterLeave" ) ; } ) ; $ scope . $ on ( '$ionicView.unloaded' , function ( ) { console . log ( "$ionicView.unloaded" ) ; } ) ; |
这篇关于ionic中$ionicView 事件的执行顺序的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!