mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 21:15:24 +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";
|
||||
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);
|
||||
}
|
||||
|
@ -29,8 +29,9 @@
|
||||
<li>There is no step 3</li>
|
||||
</ol>
|
||||
</div>
|
||||
<button (click)="toggleLastSlide()">Toggle Last Slide</button>
|
||||
</ion-slide>
|
||||
<ion-slide>
|
||||
<ion-slide *ngIf="showSlide">
|
||||
<h3>Any questions?</h3>
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
|
Reference in New Issue
Block a user