Small micro-channel program development Three: js file lifecycle of built-in functions

 
 
 
 
1. When a jump to the next screen interface, perform the onLoad () interface on a jump url parameters carried in solution in the options
onLoad: function (options) {
},

/**
* Life Cycle function - listen for the first time the page rendering is complete
*/
2. This function is not used in development but if the data can be recorded in this page's initialization function, then refresh the data without leaving the current page and then called in the onload method onReady
onReady: function () {
},
/**
* Life Cycle functions - page display monitor
*/
 3. If the current page and then back away from the current page, then the method performs onShow, A-> B-> A If the need to update the data (data A page is also updated) after the operation of the data page B in A can then onShow method of performing a function onLoad
onShow: function () {
},

/**
* Life Cycle function - monitor page Hide
*/
4. leave the current page, but the page is still in the stack when the method is executed
onHide: function () {
},

/**
* Life Cycle function - monitor page unload
*/
5. When leaving the page, and the page is destroyed, it will execute the method
onUnload: function () {
},

Guess you like

Origin www.cnblogs.com/zengmu/p/11585679.html