angular-bootstrap-ui模态大小不起作用

时间:2014-04-30 15:54:30

标签: angularjs angular-ui angular-ui-bootstrap

如何在大尺寸上调整角度ui bootstrap模式,看起来它不起作用?通过doc页面,它足以添加大小属性https://github.com/angular-ui/bootstrap/tree/master/src/modal/docs,当我尝试添加size =' lg' (使用ui-bootstrap版本0.10.0)进入example.js在官方页面的plunker中打开函数它不起作用http://plnkr.co/edit/lNqi9T8HRUHzcleY68KB?p=preview

2 个答案:

答案 0 :(得分:9)

我从来没有幸运过这个功能。我们只是使用windowClass属性向模态添加一个类,它都可以工作。

CSS
.full .modal-dialog{
    width:auto;
    margin-left:20px;
    margin-right:20px;
}

$modal.open({
   template:'blah.htm',
   windowClass:'full'
   controller:'blahCntrl'
});

答案 1 :(得分:6)

它"不起作用"由于引入此功能的提交(https://github.com/angular-ui/bootstrap/commit/976f6083e8485333612b05c023a3c490404543f0)尚未发布,因此它不是官方0.10.0版本的一部分。

您需要等待0.11.0版本(希望本周末)或者从master分支构建您自己的版本,如下所述:https://github.com/angular-ui/bootstrap#development