我正在嘗試建立一個傳送帶。我儘可能精確地跟蹤Bootstrap示例,但我沒有獲得輪播。圖像水平顯示,而不是顯示在幻燈片中。這段代碼有問題嗎?Angular 2 - Bootstrap傳送帶不能正常工作
<div class="container">
<div class="row">
<div class="col-md-12">
<div id="product-image" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#product-image" data-slide-to="0" class="active"></li>
<li data-target="#product-image" data-slide-to="1"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div [ngClass]="{active: first}">
<img src="..\assets\img\{{product.images.productImage[0]}}">
<div class="carousel-caption">
<h2>{{product.make}}</h2>
</div>
</div>
<div [ngClass]="{active: first}">
<img src="..\assets\img\{{product.images.productImage[1]}}">
<div class="carousel-caption">
<h2>{{product.make}}</h2>
</div>
</div>
</div>
<a class="left carousel-control" href="#product-image"
role="button" data-slide="prev">
<span class="icon-prev" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#product-image"
role="button" data-slide="next">
<span class="icon-next" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
你在應用程序中包含了bootstrap.min.js和jquery嗎? –
你能解決嗎?面對同樣的問題。 – vish213