
Originally Posted by
mitchellsimoens
Are you just wanting to delay the firing of the setup method?
No, I want to delay loading of script file.
Say I have:
Index.html
Main.js
View1.js
View2.js
I only need Main.js and View1.js for startup. I don't need View2.js until User click on a button on View1.js.
With Head JS, I can declare Main.js and View1.js in index.html. And load View2.js when User clicks a button on View1.
Example:
Code:
myHandleOnClick : function() {
head.js(
"https://domain/app/helper/myHelper.js", function() {
// after script load
new App.MyHelper().showView2();
});
}
My question is: does Sencha Touch have similar method? and where to find an example? Thanks.