我使用了来自http://ngmodules.org/modules/ngDialog的ngDialog,angularJs插件 单击openDialog按钮时,对话框会打开,但会被禁用。我无法与对话框互动。
HTML文件:
<body ng-app="managePartners">
<div ng-controller="managePartnerController">
<button ng-click="openTheDialog()">Open Dialog</button>
</div>
</body>
myScript.js文件:
var app = angular.module("managePartners",['ngDialog']);
app.controller("managePartnerController", function($scope , ngDialog){
$scope.openTheDialog = function(){
var dialog = ngDialog.open({
template: '<p>Are you sure you want to close the parent dialog?</p>' +
'<div class="ngdialog-buttons">' +
'<button type="button" class="ngdialog-button ngdialog-button-secondary" ng-click="closeThisDialog(0)">No' +
'<button type="button" class="ngdialog-button ngdialog-button-primary" ng-click="confirm(1)">Yes' +
'</button></div>',
plain: true,
closeByDocument: false,
closeByEscape: true,
showClose:false,
scope:$scope,
});
};
});
答案 0 :(得分:0)
导入插件的所有Css文件使其正常工作!