我編寫了以下代碼以在頁面上顯示某些產品,但我的動機是僅顯示連續5個項目。以角度連續顯示5個產品
我用於顯示所有產品代碼:
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-md-2" data-ng-repeat="prod in products">
<div class="ibox">
<div class="ibox-content product-box">
<div class="product-imitation">
<img class="product-image" src="{{prod.productImage}}" />
</div>
<div class="product-desc">
<small class="text-muted">{{prod.productDesc}}</small> <a
href="#/" class="product-name"> {{prod.productName}}</a>
<div class="m-t text-righ">
<a href="#/"
class="btn btn-xs btn-outline btn-primary animation_select"
data-animation="flipInY">Buy Now<i
class="fa fa-long-arrow-right"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
我無法弄清楚如何在一排只顯示5個產品。
只顯示5個元素其餘元素將被忽略 –