javascript - Setting active slide on angular-ui-bootstrap carousel -


I am using a plugin called "ui-bootstrap" for angular, bootstrap and angle to create the context.

I have a list of thumbnails and when a model is clicked with high definition images inside a carousel, then there is something similar on your Amazon or other websites. I used to show first in the carousel Trying to set the image as a user clicked.

I was able to get the index of the image using the $ index because I give it ng-repeat, give it to the modal controller and display the carousel without any problem. But the first image I always index is 0, even if I try to set my index.

These are some of the things I've tried:

  $ scope .SliderItems = Items; // It sets the item in a slider array item [selected index]. Active = true; $ Scope Sleditime [selected index] .active = true; $ Scope.SliderItems.select (SliderItems [SelectedIndex]);   

I also tried to establish it on a property, with the "active" property set to the right thing as required, but it was blocked on that item, then the carousel Crashed. Also, try the "Data-Slide-To" property on the carousel element without success.

  $ scope.SelectedIndex = selectedIndex;   

So I do not know which property / method has been used to do this, and the documentation does not give me more signals on the plugin page: ( >

Does anybody know about setting up the default active slide? And how can it be set even after loading it because it creates a carousel with the thumbnails below Can be useful, which you click to display

Resolve

I tried to do something like that before and did not work anyway, but try again with a different perspective After doing the active = true setting on the controller, this is HTML:

       

And in the case of the bus, Controller:

  $ scope.SliderItems = items; // items item M $ comes from another controller with scope.SliderItems [selectedIndex] .active = true; / / Selected index also comes from other controller  

Bootstrap lets you type a class Active on items to be shown actively by default.

Try it like this.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -