我正在创建一个模式:
var modal = $modal.open({ templateUrl: "/partials/welcome", controller: "welcomeCtrl", backdrop: "static", scope: $scope, });
有没有办法增加其宽度?
我使用这样的css类来定位modal-dialog类:
.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; }); };