我想這個教程實現Navbar in AngularJS引導導航欄在AngularJs
導航欄代碼
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" ng-init="navCollapsed = true" ng-click="navCollapsed = !navCollapsed">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
<div class="collapse navbar-collapse" uib-collapse="navCollapsed">
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
</li>
</ul>
<ul class="nav navbar-nav navbar-right" ng-controller="LoginController">
<li><a href="#/register">Register</a></li>
<li><a href="#/">Login</a></li>
</ul>
</div>
</div>
</nav>
依存列表
"dependencies": {
"angular": "^1.6.2",
"angular-route": "^1.6.2",
"angular-cookies": "^1.6.2",
"angular-translate": "^2.14.0",
"angular-translate-loader-static-files": "^2.14.0",
"angular-animate": "^1.6.2",
"angular-touch": "^1.6.2",
"angular-bootstrap": "^2.5.0",
"bootstrap": "^3.3.7"
}
問題是:它不工作在移動設備上。它顯示就像我要求的桌面視圖。我修整看到撥動導航欄
我的網頁網址:http://pankajservers.in
我這麼想嗎?
這應該糾正它,也適用於我。不能相信我看不到那個,但是你已經添加了class =「navbar navbar-collpase」兩次。 –
「不適用於Anrdoid」......您使用的瀏覽器是什麼?工作與否取決於設備瀏覽器的渲染引擎。嘗試清除緩存。 – MichaelHuelsen
該網站未顯示響應模式,您處於桌面模式。 – MichaelHuelsen