From a997a4d118051cbdf55fd9a0cfadb023a18435e0 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Sat, 13 Feb 2016 14:14:30 -0500 Subject: [PATCH] test(slides): added the slideChangeStart event to the intro test This will now change the navbar button text before the slide is shown. References #5301 --- ionic/components/slides/test/intro/index.ts | 13 ++++++++++--- ionic/components/slides/test/intro/main.html | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ionic/components/slides/test/intro/index.ts b/ionic/components/slides/test/intro/index.ts index b1c509f9fb..9f7ca60173 100644 --- a/ionic/components/slides/test/intro/index.ts +++ b/ionic/components/slides/test/intro/index.ts @@ -14,12 +14,19 @@ class MyApp { templateUrl: 'main.html' }) class IntroPage { - constructor(nav: NavController) { - this.nav = nav; + continueText: string = "Skip"; + + constructor(public nav: NavController) { + } onSlideChanged(slider) { - console.log('Slide changed', slider); + console.log("Slide changed", slider); + } + + onSlideChangeStart(slider) { + console.log("Slide change start", slider); + slider.isEnd ? this.continueText = "Continue" : this.continueText = "Skip"; } skip() { diff --git a/ionic/components/slides/test/intro/main.html b/ionic/components/slides/test/intro/main.html index e840a1522c..e46a13e618 100644 --- a/ionic/components/slides/test/intro/main.html +++ b/ionic/components/slides/test/intro/main.html @@ -1,14 +1,14 @@ Slides - +

Thank you for choosing the Awesome App!