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

docs(angular): update swiper events #3435

Merged
merged 6 commits into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions docs/angular/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ Let's say in an app with `ion-slides` we used the `ionSlideDidChange` event:
</ion-slides>
```

To migrate, we would change the name of the event to `slidechange`:
To migrate, we would change the name of the event to `swiperslidechange`:

```html
<swiper-container (slidechange)="onSlideChange()">
<swiper-container (swiperslidechange)="onSlideChange()">
<swiper-slide>Slide 1</swiper-slide>
<swiper-slide>Slide 2</swiper-slide>
<swiper-slide>Slide 3</swiper-slide>
Expand All @@ -256,27 +256,27 @@ To migrate, we would change the name of the event to `slidechange`:

Below is a full list of event name changes when going from `ion-slides` to Swiper Angular:

| ion-slides Event | Swiper Event |
| ------------------------- | ---------------------------- |
| `ionSlideWillChange` | `slidechangetransitionstart` |
| `ionSlideDidChange` | `slidechangetransitionend` |
| `ionSlideDoubleTap` | `doubletap` |
| `ionSlideDrag` | `slidermove` |
| `ionSlideNextStart` | `slidenexttransitionstart` |
| `ionSlideNextEnd` | `slidenexttransitionend` |
| `ionSlidePrevStart` | `slideprevtransitionstart` |
| `ionSlidePrevEnd` | `slideprevtransitionend` |
| `ionSlideReachStart` | `reachbeginning` |
| `ionSlideReachEnd` | `reachend` |
| `ionSlideTap` | `tap` |
| `ionSlideTouchStart` | `touchstart` |
| `ionSlideTouchEnd` | `touchend` |
| `ionSlideTransitionStart` | `transitionstart` |
| `ionSlideTransitionEnd` | `transitionend` |
| `ionSlidesDidLoad` | `init` |
| ion-slides Event | Swiper Event |
| ------------------------- | ---------------------------------- |
| `ionSlideWillChange` | `swiperslidechangetransitionstart` |
| `ionSlideDidChange` | `swiperslidechange` |
| `ionSlideDoubleTap` | `swiperdoubletap` |
| `ionSlideDrag` | `swiperslidermove` |
| `ionSlideNextStart` | `swiperslidenexttransitionstart` |
| `ionSlideNextEnd` | `swiperslidenexttransitionend` |
| `ionSlidePrevStart` | `swiperslideprevtransitionstart` |
| `ionSlidePrevEnd` | `swiperslideprevtransitionend` |
| `ionSlideReachStart` | `swiperreachbeginning` |
| `ionSlideReachEnd` | `swiperreachend` |
| `ionSlideTap` | `swipertap` |
| `ionSlideTouchStart` | `swipertouchstart` |
| `ionSlideTouchEnd` | `swipertouchend` |
| `ionSlideTransitionStart` | `swipertransitionstart` |
| `ionSlideTransitionEnd` | `swipertransitionend` |
| `ionSlidesDidLoad` | `swiperinit` |

:::note
All events available in Swiper Element can be found at <a href="https://swiperjs.com/swiper-api#events" target="_blank" rel="noopener noreferrer">https://swiperjs.com/swiper-api#events</a>.
All events available in Swiper Element can be found at <a href="https://swiperjs.com/swiper-api#events" target="_blank" rel="noopener noreferrer">https://swiperjs.com/swiper-api#events</a> and should be lowercased and prefixed with the word `swiper`.
:::

## Methods
Expand Down