当我收到 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 代码。关于如何执行此操作的任何想法?
谢谢
最佳答案
您可以使用 ng-cloak 在 Angular Bootstrap 应用程序之前隐藏元素
关于javascript - Cordova - Angular - ionic : Implement a loader before bootstrapping angular app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24186505/