diff --git a/example/src/app/app.component.ts b/example/src/app/app.component.ts
index 5277693..f53da57 100644
--- a/example/src/app/app.component.ts
+++ b/example/src/app/app.component.ts
@@ -109,7 +109,7 @@ export class AppComponent {
console.log('Swiper index: ', index);
}
- public onTransitionEnd(event: any[]): void {
+ public onSwiperEvent(event: string): void {
console.log('Swiper event: ', event);
}
}
diff --git a/src/lib/swiper.directive.ts b/src/lib/swiper.directive.ts
index 857d9b4..cb1a879 100644
--- a/src/lib/swiper.directive.ts
+++ b/src/lib/swiper.directive.ts
@@ -148,7 +148,7 @@ export class SwiperDirective implements AfterViewInit, OnDestroy, DoCheck, OnCha
SwiperEvents.forEach((eventName: SwiperEvent) => {
let swiperEvent = eventName.replace('swiper', '');
- swiperEvent = eventName.charAt(0).toLowerCase() + eventName.slice(1);
+ swiperEvent = swiperEvent.charAt(0).toLowerCase() + swiperEvent.slice(1);
this.instance.on(swiperEvent, (...args: any[]) => {
if (args.length === 1) {