mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
Merge branch 'pr/6655' into 2.0
This commit is contained in:
@ -882,13 +882,17 @@ export class Slide {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
elementRef: ElementRef,
|
elementRef: ElementRef,
|
||||||
@Host() slides: Slides
|
@Host() private slides: Slides
|
||||||
) {
|
) {
|
||||||
this.ele = elementRef.nativeElement;
|
this.ele = elementRef.nativeElement;
|
||||||
this.ele.classList.add('swiper-slide');
|
this.ele.classList.add('swiper-slide');
|
||||||
|
|
||||||
slides.rapidUpdate();
|
slides.rapidUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnDestroy() {
|
||||||
|
this.slides.rapidUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,6 +19,7 @@ class IntroPage {
|
|||||||
continueText: string = "Skip";
|
continueText: string = "Skip";
|
||||||
startingIndex: number = 1;
|
startingIndex: number = 1;
|
||||||
mySlideOptions;
|
mySlideOptions;
|
||||||
|
showSlide: boolean = true;
|
||||||
|
|
||||||
constructor(private nav: NavController) {
|
constructor(private nav: NavController) {
|
||||||
this.mySlideOptions = {
|
this.mySlideOptions = {
|
||||||
@ -42,6 +43,10 @@ class IntroPage {
|
|||||||
console.log("Slide move", slider);
|
console.log("Slide move", slider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toggleLastSlide() {
|
||||||
|
this.showSlide = !this.showSlide;
|
||||||
|
}
|
||||||
|
|
||||||
skip() {
|
skip() {
|
||||||
this.nav.push(MainPage);
|
this.nav.push(MainPage);
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,9 @@
|
|||||||
<li>There is no step 3</li>
|
<li>There is no step 3</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
<button (click)="toggleLastSlide()">Toggle Last Slide</button>
|
||||||
</ion-slide>
|
</ion-slide>
|
||||||
<ion-slide>
|
<ion-slide *ngIf="showSlide">
|
||||||
<h3>Any questions?</h3>
|
<h3>Any questions?</h3>
|
||||||
</ion-slide>
|
</ion-slide>
|
||||||
</ion-slides>
|
</ion-slides>
|
||||||
|
Reference in New Issue
Block a user