I'm new in angularjs and working on a ajax loading item carousel with angular, when I put items static in carousel it work fine but when I put ng-repeat
to render dynamic the rendered items are not right and it looks like that the carousel js is not working on them and put them in order.
I load the js of the carousel with ng-include and it works fine for static items but not for angular rendered items
What should I do? Am I doing a sequence wrong?
My Controller loading varible:
hmc.Sliders.Episodes.push(Movies);
In my home view:
<div class="row rtl prj-row">
<div class="col-sm-10 col-sm-push-1 col-xs-10 col-xs-push-1">
<h4 class="prg-row-heading rtl">my slider<span class="glyphicon glyphicon-menu-left"></span></h4>
<div class="owl-carousel">
<div class="item" ng-repeat="slider in hmc.Sliders.Episodes[hmc.Sliders.Page-1]">
<div class="prj-show-box one-row">
<div class="prj-show-box-cover">
<ul>
<li>{{::slider.title}}</li>
<li>{{::slider.duration_mins}}</li>
</ul>
</div>
<img ng-src="{{::slider .picture_path}}" width="213" height="318" alt="" class="img-responsive"/></div>
</div>
</div>
</div>
</div>
It put correctly the data and renders items but not showing correctly
But it show items correctly for static ones:
<div class="row rtl prj-row">
<div class="col-sm-10 col-sm-push-1 col-xs-10 col-xs-push-1">
<h4 class="prj-row-heading rtl">sliders<span class="glyphicon glyphicon-menu-left"></span></h4>
<div class="owl-carousel">
<div class="item">
<div class="prj-show-box"><img src="/media/img/home/live/1.gif" width="220" height="148" alt="" class="img-responsive"/></div>
<div class="prj-show-box"><img src="/media/img/home/live/1.gif" width="220" height="148" alt="" class="img-responsive"/></div>
</div>
</div>
</div>
</div>
This is how it's look like: