Skip to content

Commit

Permalink
feat(slides): add slideChangeStart event output
Browse files Browse the repository at this point in the history
Didn’t add any event for `slideChangeEnd` because this already exists
as `change`.

closes #5301
  • Loading branch information
brandyscarney committed Feb 13, 2016
1 parent ebeb940 commit 736140c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ionic/components/slides/slides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ export class Slides extends Ion {
*/
@Output() change: EventEmitter<any> = new EventEmitter();

/**
* @output {any} expression to evaluate when a slide change starts
*/
@Output() slideChangeStart: EventEmitter<any> = new EventEmitter();

/**
* @private
* @param {ElementRef} elementRef TODO
Expand Down Expand Up @@ -260,6 +265,7 @@ export class Slides extends Ion {
return this.options.onTransitionEnd && this.options.onTransitionEnd(swiper, e);
};
options.onSlideChangeStart = (swiper) => {
this.slideChangeStart.emit(swiper);
return this.options.onSlideChangeStart && this.options.onSlideChangeStart(swiper);
};
options.onSlideChangeEnd = (swiper) => {
Expand Down

0 comments on commit 736140c

Please sign in to comment.