Angular strap modal popup does not showing the background
by Guillaume Seguin
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<div ng-controller="ModalDemoCtrl">
{{ name }}
</div>
JavaScript
'use strict';
var app = angular.module('myApp', []);
app.controller('ModalDemoCtrl', function($scope, $q) {
function asyncGreet(name) {
// perform some asynchronous operation, resolve or reject the promise when appropriate.
return $q(function(resolve, reject) {
if ( true ) {
resolve('Hello, ' + name + '!');
} else {
reject('Greeting ' + name + ' is not allowed.');
}
});
}
var promise = asyncGreet('Robin Hood');
promise.then(function(greeting) {
alert('Success: ' + greeting);
$scope.name = greeting;
}, function(reason) {
alert('Failed: ' + reason);
});
});