2013-08-07 92 views
2

當我點擊下面定義的按鈕時,模式框不顯示。如果我使用chrome developper工具,我發現我的div「modalDisplay」填充了我的modalDisplay.html內容,但是當我單擊按鈕時,沒有任何反應,沒有錯誤,沒有任何反應。我使用angularjs與angularjs引導插件angularjs twitter引導模式不顯示

在我的部分觀點我有以下幾點:

<div id="modalDisplay" class="modal hide fade" ng-include="'./app/templates/modalDisplay.html'"></div> 

<button class="btn btn-primary" href="#modalDisplay" data-toggle="modal" ng-show="displayType=='Customer'"> 
Show Modal 
</button> 

在我modalDisplay.html

<div ng-controller="mODALCtrl" class="ng-scope"> 
    <div class="modal-header"> 
     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> 
     <h3>My modal</h3> 
    </div> 
    <div class="modal-body"> 
     <p>One fine body…</p> 
     <div></div> 
    </div> 
    <div class="modal-footer"> 
     <a href="#" class="btn" data-dismiss="modal">Cancel</a> 
    </div> 
</div> 

回答

2

使用https://github.com/sarath2/ngEkathuwa

它支持引導3角1.2

eg1: stylish with 80% width 

    $ekathuwa.modal({ 
     id:"yourModalId", 
     contentStyle:"heigth:400px;background-color:#1b78f7;", 
     contentCustomSize:80 
    }); 

eg2: Stylish with pre-defined sizes /df= Bootstrap's default modal width/ 
sm= small width/ 
md= medium width/ 
lg= large width/ 
fl= full width 

    $ekathuwa.modal({ 
     id:"yourModalId", 
     contentStyle:"400px;background-color:#1b78f7;", 
     contentPreSize:'lg' 
    }); 
+1

誠徵通過bower.But嚐嚐今天這個庫爲什麼你的github回購大小超過17 MB?那是因爲某種原因,你推了你的node_modules ... – gerasalus

+0

gerasalus,不要粗魯。他根本不必推它。 –