Replies: 2 comments
-
I have created a 2nd StackBlitz using Swiper Element rather than Swiper Core: https://stackblitz.com/edit/stackblitz-starters-k8ze2e?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html,src%2Fglobal_styles.css Similar behavior appears as the above issue. But in this case when using Angular template to generate the If this needs to be opened as a separate issue, then I am happy to do so. |
Beta Was this translation helpful? Give feedback.
-
Check that this is really a bug
Reproduction link
https://stackblitz.com/edit/stackblitz-starters-bjqjfw?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html
Bug description
We have a flashcard application where we want the user to be able to remove flashcards (slides).
In above StackBlitz, setting
AppComponent
class variableuseAngularTemplate = true
shows a basic swiper application where theswiper-slides
render via Angular template@for
loop. Follow these steps and the below issue will appear:[object HTMLDivElemnent]
rather than proper slidesExpected Behavior
In the same StackBlitz set the
AppComponent
class variableuseAngularTemplate = false
creates the slides when the Swiper is initialized setting thevirtual
property as suchvirtual: { slides },
. In this case, following the same steps as above works as expected.I would use this approach in our actual application but the flashcard slides use an angular template with animations, conditionals, and other Angular specific template details. These flashcard slides will not render properly using this approach.
Actual Behavior
Then this appears on following slides when rendering
swiper-slides
via Angular template@for
loop:Swiper version
11.1.4
Platform/Target and Browser Versions
Used in Mac & Windows all browsers, and iOS & Android native apps. Testing reported here is on Mac using Chrome.
Validations
Would you like to open a PR for this bug?
Beta Was this translation helpful? Give feedback.
All reactions