diff --git a/demos/config/index.ts b/demos/config/index.ts index 3456bcbcd3..acf98af555 100644 --- a/demos/config/index.ts +++ b/demos/config/index.ts @@ -1,4 +1,4 @@ -import {App, Page, IonicApp, Platform} from 'ionic/ionic'; +import {App, Page, IonicApp, Platform, NavController} from 'ionic/ionic'; @App({ templateUrl: 'app.html', @@ -25,20 +25,22 @@ export class TabPage { templateUrl: 'main.html' }) export class InitialPage { - constructor(platform: Platform) { + constructor(platform: Platform, nav: NavController) { this.platform = platform; + this.nav = nav; + if (window.localStorage.getItem('configDemo') !== null) { this.config = JSON.parse(window.localStorage.getItem('configDemo')); } else if (platform.is('ios')) { this.config = { - 'backButtonIcon': 'ion-ios-arrow-back', + 'backButtonIcon': 'ios-arrow-back', 'iconMode': 'ios', 'tabbarPlacement': 'bottom' }; } else { this.config = { - 'backButtonIcon': 'ion-md-arrow-back', + 'backButtonIcon': 'md-arrow-back', 'iconMode': 'md', 'tabbarPlacement': 'top' }; @@ -51,4 +53,22 @@ export class InitialPage { window.localStorage.setItem('configDemo', JSON.stringify(this.config)); window.location.reload(); } + + push() { + this.nav.push(AnotherPage); + } +} + +@Page({ + templateUrl: 'page.html' +}) +export class AnotherPage { + constructor(nav: NavController) { + this.nav = nav; + + } + + pop() { + this.nav.pop(); + } } diff --git a/demos/config/main.html b/demos/config/main.html index b9a71788ae..a0701bbb0d 100644 --- a/demos/config/main.html +++ b/demos/config/main.html @@ -7,8 +7,11 @@ Back Button Icon - ion-ios-arrow-back - ion-md-arrow-back + ios-arrow-back + md-arrow-back + close + heart + globe @@ -46,6 +49,12 @@ } }) +
+ +
+