繁体   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