angularjs – 如何在Angular UI Bootstrap中增加模态宽度?

前端之家收集整理的这篇文章主要介绍了angularjs – 如何在Angular UI Bootstrap中增加模态宽度?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我创建一个模态:
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;
            });
    };
原文链接:https://www.f2er.com/angularjs/146904.html

猜你在找的Angularjs相关文章