You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using the web component version of Swiper in our Ionic 7 and Angular 16 app.
We have a generic Swiper implementation which receives an array of Angular components. Swiper slides are being generated by using *ngFor on the component array and we can see the actual DOM being generated correctly. However, it seems that the slides aren't being hydrated properly.
Hello @StephanBis. Please provide a online reproduction by codesandbox or a minimal GitHub repository. You can fork one of our demos in codesandbox to get start. Issues labeled by missing demo will be closed if no activities in 3 days.
After more trial & error we found the error. We had to add and *ngIf to the container of the swiper container so that it only gets initialized when the components array is filled with data.
Check that this is really a bug
Reproduction link
Should be pretty obvious
Bug description
We are using the web component version of Swiper in our Ionic 7 and Angular 16 app.
We have a generic Swiper implementation which receives an array of Angular components. Swiper slides are being generated by using *ngFor on the component array and we can see the actual DOM being generated correctly. However, it seems that the slides aren't being hydrated properly.
HTML:
TS:
Expected Behavior
That the slides would get hydrated correctly, so that simple methods like .slideNext() work as expected.
Actual Behavior
E.g. .slideNext() only works for hardcoded slides or slides getting generated from a simple string array.
HTML:
TS:
test: string[] = ['1', '2', '3'];
Generated HTML:
As you can see the last couple of slides aren't being hydrated correctly. You cannot swipe or slide to these ones.
Swiper version
10.0.3
Platform/Target and Browser Versions
Android
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: