簡體   English   中英

將Angular與Twitter Bootstrap模板一起使用

[英]Using Angular with Twitter Bootstrap templates

想要在其他Angular應用程序中使用Twitter Bootstrap模板。 Angular-UI替換了Bootstrap的JS,並且一切正常。

頁面狹窄時出現的“漢堡”按鈕不起作用。 相比之下,頁面寬時出現的下拉列表確實適用於Angular。 有什么建議嗎?

http://jsfiddle.net/user645715/EJ3P7/

具體來說就是這個按鈕。 我應該包含一個指令,還是Angular UI中不包含的指令?

 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span>
 <span class="icon-bar"></span>
 <span class="icon-bar"></span>

要使“漢堡包”按鈕正常工作,即使使用Angular-UI,您仍然需要包括jQuery和原始的Bootstrap JS。

<script src="http://codeorigin.jquery.com/jquery-2.0.3.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.1.1/angular.min.js"></script>
<script src="https://rawgithub.com/angular-ui/bootstrap/1c231e4f41fd5030de26c754754a3e4860ad30c7/ui-bootstrap-tpls-0.6.0.min.js">
</script>

http://jsfiddle.net/stmcallister/zwCn4/3/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM