0
我想在我的项目中添加模型对话框。在角度js中打开模型对话框时出现错误
我的HTML代码如下:
<div ng-controller="bodyController">
<!-- This html would live at the path specified in the controller: path/to/your/modal-template.html -->
<button class="btn" ng-click="open()">Open Modal</button>
<div modal="showModal" close="cancel()">
<div class="modal-header">
<h4>Modal Dialog</h4>
</div>
<div class="modal-body">
<p>Example paragraph with some text.</p>
</div>
<div class="modal-footer">
<button class="btn btn-success" ng-click="ok()">Okay</button>
<button class="btn" ng-click="cancel()">Cancel</button>
</div>
</div>
</div>
而且我app.js是这样的:
var app = angular.module("MyApp", ["ui.bootstrap.modal"]);
app.controller("bodyController", function($scope) {
$scope.open = function() {
$scope.showModal = true;
};
$scope.ok = function() {
$scope.showModal = false;
};
$scope.cancel = function() {
$scope.showModal = false;
};
});
我在我的index.html file.Still我加角UI引导JS没有得到模型对话框。我收到了一个错误,我正在接受。
我的错误是这样的:
任何人都可以建议我怎么做解决这个错误。
更新错误问题 –
什么错误显示? –
任何控制台错误?在这里发布 –