【发布时间】:2014-06-12 14:06:38
【问题描述】:
当我收到 deviceReady 事件(或在浏览器中测试时手动强制它)时,我正在使用此代码引导 mi Angular 应用程序:
var PhoneGapInit = function () {
this.boot = function () {
console.log("starting angular");
angular.bootstrap(document, ['cmmApp']);
};
if (window.cordova !== undefined) {
console.log("Found Cordova");
var _this = this;
document.addEventListener('deviceready', function() {
_this.boot();
});
} else {
console.log('PhoneGap not found, booting Angular manually');
this.boot();
}
};
//this start angular
angular.element(document).ready(function() {
new PhoneGapInit();
});
但我想创建一个加载器并在应用加载之前隐藏“脏且无样式”的 html 代码。关于如何做到这一点的任何想法?
谢谢
【问题讨论】:
标签: javascript angularjs loader ionic-framework