我是angularjs的新手
我想在引导程序中使用模态
但对我的页面没有任何影响
并且没有错误信息
这是我的代码
<div ng-controller="MainCtrl">
<button class="btn" ng-click="open()">Open me!</button>
<div modal="shouldBeOpen" close="close()" options="opts">
<div class="modal-header">
<h3>I'm a modal!</h3>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button class="btn btn-warning cancel" ng-click="close()">Cancel</button>
</div>
</div>
'use strict';
angular.module('yeomanContactsAppApp')
.controller('MainCtrl', function ($scope) {
$scope.open = function () {
$scope.shouldBeOpen = true;
};
$scope.close = function () {
$scope.closeMsg = 'I was closed at: ' + new Date();
$scope.shouldBeOpen = false;
};
$scope.items = ['item1', 'item2'];
$scope.opts = {
backdropFade: true,
dialogFade:true
};});
它导致直接显示模态内容,而不是单击按钮显示模态?我很困惑,请帮助
多谢 !