From a8bc0d201103e18355cb0dd64aaeb0fa9a6bcb97 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 27 Jan 2016 15:36:41 -0500 Subject: [PATCH] docs(demos): prettify the config demo --- demos/config/index.ts | 7 +-- demos/config/main.html | 103 ++++++++++++++++++++--------------------- demos/config/tabs.html | 8 ++-- 3 files changed, 58 insertions(+), 60 deletions(-) diff --git a/demos/config/index.ts b/demos/config/index.ts index e116fcb439..3456bcbcd3 100644 --- a/demos/config/index.ts +++ b/demos/config/index.ts @@ -28,7 +28,7 @@ export class InitialPage { constructor(platform: Platform) { this.platform = platform; if (window.localStorage.getItem('configDemo') !== null) { - this.config = JSON.parse(window.localStorage.getItem('configDemo')); + this.config = JSON.parse(window.localStorage.getItem('configDemo')); } else if (platform.is('ios')) { this.config = { @@ -43,11 +43,12 @@ export class InitialPage { 'tabbarPlacement': 'top' }; } + + this.initialConfig = JSON.parse(JSON.stringify(this.config)); } load() { window.localStorage.setItem('configDemo', JSON.stringify(this.config)); window.location.reload(); - } + } } - diff --git a/demos/config/main.html b/demos/config/main.html index 161ea96864..b9a71788ae 100644 --- a/demos/config/main.html +++ b/demos/config/main.html @@ -2,63 +2,60 @@ Config - + + + + Back Button Icon + + ion-ios-arrow-back + ion-md-arrow-back + + - - @App({ - + + Icon Mode + + ios + md + + - + + Tab Placement + + bottom + top + + - - config: { + +

Note: the config will not be updated until you click the button below.

- - - backButtonIcon: - - - - - - - iconMode: - - - - - - - tabbarPlacement: - - - - - - - } - - - - - - }) - - - - - + + + +
@App({
+  config: {
+    backButtonIcon: {{initialConfig.backButtonIcon}}
+    iconMode: {{initialConfig.iconMode}}
+    tabbarPlacement: {{initialConfig.tabbarPlacement}}
+  }
+})
+ + diff --git a/demos/config/tabs.html b/demos/config/tabs.html index 99fb1cc28d..fcb1e2a846 100644 --- a/demos/config/tabs.html +++ b/demos/config/tabs.html @@ -1,5 +1,5 @@ - - - - \ No newline at end of file + + + +