I'm trying to use the modal from angular ui bootstrap, but it is not showing although the window is blur when the code to show the modal executes,
the codes for the modal is:
<script type="text/ng-template" id="test.html">
<div class="modal-header">
<h3>XXXX</h3>
</div>
<div class="modal-body">
<p>XXXX</p>
</div>
<div class="modal-footer">
xxxxxx
</div>
</script>
the button to show the modal:
<div class="container-fluid" ng-controller="MainController">
<button ng-click="showModal()" ></button>
</div>
the controller:
var app = angular.module('angularjs-starter', ['ui.bootstrap']);
app.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/', {
templateUrl: '/home.html'
});
}]);
app.controller('MainController', function($scope, $rootScope, $modal) {
$scope.showModal = function() {
$modal.open({templateUrl:'test.html', backdrop: true,windowClass: 'modal'});
};
});
Is there any problem with the above codes?