Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to set the first image as selected by default on load? I have a border wrapped around the selected-image #102

Open
Apperfect opened this issue Mar 4, 2021 · 3 comments
Assignees

Comments

@Apperfect
Copy link

No description provided.

sanjayV added a commit that referenced this issue Apr 24, 2021
@sanjayV sanjayV self-assigned this Apr 24, 2021
@sanjayV
Copy link
Owner

sanjayV commented Apr 26, 2021

@Apperfect
In ng-image-slider latest verson (2.8.0) I have added new input defaultActiveImage for make image as selected on load

working example : https://stackblitz.com/edit/angular-ivy-lnafx2?file=src%2Fapp%2Fapp.component.html

@rodrigofbm
Copy link

@sanjayV that NgImageSliderComponenthas some method to set specific visible image?
By now I have to use some hack with next() and prev()

@Alemeka
Copy link

Alemeka commented Jun 2, 2023

First of all, congrats for the component. It´s really great.

I´ve been trying to set the selected initial slide as you comment but the carousel does not set the selected image if it´s not showing in it. For example, in the stackblitz demo, if you set defaultActiveImage to a slide between 0 and 3 - the ones that are visible in the carousel- it works. But if you set the 5 the carousel does not move and you can´t see the selected image.
Am I doing something wrong?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants