mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
nav/template stuff
This commit is contained in:
@ -8,22 +8,8 @@
|
||||
// trigger that the DOM is ready
|
||||
framework.trigger("ready");
|
||||
|
||||
// ensure that the start page has an id
|
||||
var mainElement = document.querySelector("main");
|
||||
if(mainElement) {
|
||||
if(!mainElement.id || mainElement.id === "") {
|
||||
mainElement.id = "pg" + Math.floor( Math.random() * 999999 );
|
||||
}
|
||||
|
||||
// remember what the active page's id is
|
||||
framework.activePageId = mainElement.id;
|
||||
|
||||
// inform the framework that the start page has been added to the DOM
|
||||
framework.trigger("pagecreate", {id: mainElement.id, url: location.href});
|
||||
|
||||
// trigger that the start page is in view
|
||||
framework.trigger("pageview");
|
||||
}
|
||||
// trigger that the start page is in view
|
||||
framework.trigger("pageview");
|
||||
}
|
||||
|
||||
// When the DOM is ready, initalize the webapp
|
||||
|
||||
Reference in New Issue
Block a user