Setting active slide on angular-ui-bootstrap carousel

前端 未结 4 1701
孤城傲影
孤城傲影 2021-02-16 00:15

I\'m using angular, bootstrap and a plugin called \"ui-bootstrap\" for angular to make a carousel.

I have a list of thumbnails and when clicking one a modal with the ima

4条回答
  •  无人及你
    2021-02-16 00:25

    There is an active directive on the uib-carousel element:

    
      
           
    
    

    You can set the active slide by assigning the $index of the desired slide to the active parameter:

    Make slide 3 active
    

    AngularUI watches the 'active' field and will create a smooth transition to the selected slide.

    I believe this behavior is recent and supersedes setting the active property from the older versions.

提交回复
热议问题