我创建一个模态:
var modal = $modal.open({ templateUrl: "/partials/welcome",controller: "welcomeCtrl",backdrop: "static",scope: $scope,});
有没有办法增加它的宽度?
我使用类似这样的css类来定位模态对话框类:
.app-modal-window .modal-dialog { width: 500px; }
然后在控制器调用模态窗口中,设置windowClass:
$scope.modalButtonClick = function () { var modalInstance = $modal.open({ templateUrl: 'App/Views/modalView.html',controller: 'modalController',windowClass: 'app-modal-window' }); modalInstance.result.then( //close function (result) { var a = result; },//dismiss function (result) { var a = result; }); };