ng-init in uib-carousel -> height becomes 0px

105 Views Asked by At

After adding ng-init with images and unique id inside uib-carousel everything is equal to 0px (images, div's inside uib-carousel).

Here is plunker

<div uib-carousel active="active" ng-init="slides = [{id: 1, image: 'https://placekitten.com/g/200/300'}, {id: 2, image: 'https://dgshow.org/files/2014/09/320px-Macaca_nigra_self-portrait_rotated_and_cropped-200x300.jpg'}]" interval="myInterval" no-wrap="noWrapSlides">
1

There are 1 best solutions below

1
On BEST ANSWER

Here is the answer

You just need to replace :

index="slide.id"  

By :

index="$index"