我正在开发一个角js和靴子的网站。如何使用Angular Js + bootsrap设置弹出窗口?
当网站加载我正在做一些服务器调用来获取一些数据。这个过程需要一些时间。在这段时间内,我想显示一个等待消息弹出。
但我卡在这里如何与我的设置。 在app.js中,在run方法中我想添加弹出调用来显示并隐藏一次执行完成。
.run(["$log", "$rootScope", "$state", "dtoResource", "questionResource", function ($log, $rootScope, $state, dtoResource, questionResource) {
dtoResource.rc1Step1DTO()
.then(function (data) {
$rootScope.AutoQuote = data;
questionResource.getQuestions($rootScope.AutoQuote.postAutoQuoteObj.SessionInfo.StateCode)
.then(function (questions) {
$rootScope.questions = questions;
$rootScope.answers = {PC: 12345};
console.log('Copy operation');
angular.copy($rootScope.answers,$rootScope.default);
console.log($rootScope.answers);
console.log($rootScope.default);
})
})
.then(function() {
//console.log('This should be printed after the above methods are done executing');
// console.log($rootScope);
})
}])
Below is plunker link
https://plnkr.co/edit/aV65Nab9U9I6YlK2g4sY?p=preview
我可以在不使用ui-bootstrap-tpls-2.1.1.js,1.5.8/angular-animate.js,1.5.8/angular-sanitize.js的情况下创建弹出式窗口,这在应用程序中看起来很管用。 –
我同意这是一个小的开销。您可以放弃角度动画,但您需要该模板。如果你没有使用Sanitize,那么你错过了角度的功能。 – Alok
现在无论我使用的是在我的抢劫者。 –