引导程序按钮无法正常工作
按钮下一个和上一个,打开主页而不是不同的幻灯片。 我从0做了10次,肯定是我做错了。
这是我的代码
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Numele Site-ului</a>
</div>
<form class="navbar-form navbar-right">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search" ng-model="searchAdvert">
</div>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span class="glyphicon glyphicon-record"></span> Contact</a></li>
<li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
</div>
</nav>
<!-- Carousel -->
<div class="container">
<div class="row">
<div class="col-md-5">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- indicators dot nav-->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="images/audi.jpg" alt="audi">
<div class="carousel-caption">
<h1>Amazing RS7</h1>
</div>
</div>
<div class="item">
<img src="images/bmw.jpg" alt="bmw">
<div class="carousel-caption">
<h1>Awesome Bmw X6</h1>
</div>
</div>
<div class="item">
<img src="images/mercedes.jpg" alt="mercedes">
<div class="carousel-caption">
<h1>This is ME.</h1>
</div>
</div>
</div>
<!-- controls or next and prev btns-->
<a href="#myCarousel" class="left carousel-control" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a href="#myCarousel" class="right carousel-control" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</div>