I have a list Reviews and I need to bind it with html in such a way that div with class item can have maximum 3 child divs and after that it should create a new div with class item which also can have maximum 3 divs and so on.
I have tried below code but not working :
<div class="item" ng-repeat="_list in Reviews" ng-if="$index % 3 == 0">
<div class="col-md-4 col-sm-6" ng-repeat="_list in Reviews" ng-if="$index < 3">
<p> {{_list.Comment}}</p>
</div>
</div>
Edit : Its creating div with class item having 3 children divs and then create new div with class item and again same 3 children divs.
Example Reviews has 4 elements : A,B,C,D Supposed Output :
<div class="item">
<div class="col-md-4 col-sm-6">
<p> A</p>
<p> B</p>
<p> C</p>
</div>
</div>
<div class="item">
<div class="col-md-4 col-sm-6">
<p> D</p>
</div>
</div>
And it giving below output :
<div class="item">
<div class="col-md-4 col-sm-6">
<p> A</p>
<p> B</p>
<p> C</p>
</div>
</div>
<div class="item">
<div class="col-md-4 col-sm-6">
<p> A</p>
<p> B</p>
<p> C</p>
</div>
</div>
Reviews) and expected output(HTML)Reviewsin chuck and iterate that