ui-carousel
ui-carousel copied to clipboard
Using ng-if causes duplicates in the number of items
When adding ng-if on container div for ui-carousel, each time the div is displayed , ui-carousel will multiply the items inside of it.
this is the example of the code:
<div ng-if="Dashboard.flag">
<ui-carousel
slides="Dashboard.slides"
slides-to-show="3"
slides-to-scroll="1"
initial-slide="1"
dots="true">
<carousel-item>
<h3>{{ item + 1 }}</h3>
</carousel-item>
</ui-carousel>
</div>
<button ng-click="Dashboard.showhide()">Click me</button>
any idea how to fix this?
this is the firs time:
this is after hiding and showing div:
@zeiadhabbab Fixed on e3696ca