mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
test(slides): add test to toggle the last slide with ngIf
references #6651
This commit is contained in:
@ -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