From dbe54b503d8fe8b1121af6187d66ee48d8af8df1 Mon Sep 17 00:00:00 2001 From: Zachary Keeton Date: Wed, 25 May 2016 12:16:21 -0400 Subject: [PATCH 1/2] fix(slides): Removing a slide via *ngIf now properly removes the slide and the bullet from the pager. (closes #6651) --- src/components/slides/slides.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/slides/slides.ts b/src/components/slides/slides.ts index 6d70118161..6f6c767099 100644 --- a/src/components/slides/slides.ts +++ b/src/components/slides/slides.ts @@ -902,13 +902,17 @@ export class Slide { constructor( elementRef: ElementRef, - @Host() slides: Slides + @Host() private slides: Slides ) { this.ele = elementRef.nativeElement; this.ele.classList.add('swiper-slide'); slides.rapidUpdate(); } + + ngOnDestroy() { + this.slides.rapidUpdate(); + } } /** From 1b9fafeb49d5ecee771b74894d63939394ed2bc5 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Tue, 31 May 2016 12:26:56 -0400 Subject: [PATCH 2/2] test(slides): add test to toggle the last slide with ngIf references #6651 --- src/components/slides/test/intro/index.ts | 5 +++++ src/components/slides/test/intro/main.html | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/slides/test/intro/index.ts b/src/components/slides/test/intro/index.ts index 32161fddaa..cd626b8e5b 100644 --- a/src/components/slides/test/intro/index.ts +++ b/src/components/slides/test/intro/index.ts @@ -19,6 +19,7 @@ class IntroPage { continueText: string = "Skip"; startingIndex: number = 1; mySlideOptions; + showSlide: boolean = true; constructor(private nav: NavController) { this.mySlideOptions = { @@ -42,6 +43,10 @@ class IntroPage { console.log("Slide move", slider); } + toggleLastSlide() { + this.showSlide = !this.showSlide; + } + skip() { this.nav.push(MainPage); } diff --git a/src/components/slides/test/intro/main.html b/src/components/slides/test/intro/main.html index f2a1e4d888..d41879b243 100644 --- a/src/components/slides/test/intro/main.html +++ b/src/components/slides/test/intro/main.html @@ -29,8 +29,9 @@
  • There is no step 3
  • + - +

    Any questions?