启动引导的一个非常简单的方法是在BootstrapCDN中引用引导CSS和JS。不需要编译.(按照参考文献2中的说明),在深入到Bower之前,我想探究一下依赖项manually.So I在Chrome中打开这个文件。角质起作用。css类没有。在html中,引用是否正确地指向?如果是这样,为什么我的类不显示?已经过去了,房间里一定有一只我没看见的大象。
<html ng-app>
<head>
<script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js'> </script>
<!-- Bootstrap
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
-->
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<body ng-init="what = 'Angularjs'">
<div class="container">
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="#">Quick Start</a>
<ul class="nav">
<li><a ui-sref="route1">Route 1</a></li>
<li><a ui-sref="route2">Route 2</a></li>
<li ng-class="{ active: $state.includes('blue') }">
<a href="#/blue">Blue</a>
</li>
<li ng-class="{ active: $state.includes('green') }">
<a href="#/green">Green</a>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="span12">
<div class="well" ui-view></div>
</div>
</div>
Now your cooking with {{what}}!
<hr/>
{{"hello"+" world"}}
<a href="http://stackoverflow.com/questions/17947084/how-to-host-an-angularjs-app-in-domain ">Ref 1</a>
<a href="http://stackoverflow.com/questions/16459363/is-there-an-easy-way-to-start-to-use-twitter-bootstrap ">Ref 2</a>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins)
<script src="https://code.jquery.com/jquery.js"></script> -->
<!-- Include all compiled plugins (below), or include individual files as needed
<script src="js/bootstrap.min.js"></script> -->
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
</body>
</html>
发布于 2013-12-03 03:14:45
试着使用:
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet" />
而不是:
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
有时如果没有"http:“,它就无法工作。
https://stackoverflow.com/questions/20348819
复制