From 45311fc7d46a5befde493d780d8f364933cbdec4 Mon Sep 17 00:00:00 2001 From: Dan Bucholtz Date: Fri, 16 Feb 2018 09:52:44 -0600 Subject: [PATCH] test(nav): nav then tabs test --- .../src/components/nav/test/basic/index.html | 17 +- .../nav/test/nav-then-tabs/index.html | 387 ++++++++++++++++++ .../nav/test/simple-nested-navs/index.html | 33 +- 3 files changed, 417 insertions(+), 20 deletions(-) create mode 100644 packages/core/src/components/nav/test/nav-then-tabs/index.html diff --git a/packages/core/src/components/nav/test/basic/index.html b/packages/core/src/components/nav/test/basic/index.html index 5f2685543d..11fe138b16 100644 --- a/packages/core/src/components/nav/test/basic/index.html +++ b/packages/core/src/components/nav/test/basic/index.html @@ -32,6 +32,9 @@ + + + Page Two @@ -42,11 +45,7 @@ Go to Page Two -
- - Go Back - -
+
`; @@ -59,16 +58,14 @@ + + + Page Three

Page Three

-
- - Go Back - -
`; diff --git a/packages/core/src/components/nav/test/nav-then-tabs/index.html b/packages/core/src/components/nav/test/nav-then-tabs/index.html new file mode 100644 index 0000000000..ec231e47e1 --- /dev/null +++ b/packages/core/src/components/nav/test/nav-then-tabs/index.html @@ -0,0 +1,387 @@ + + + + + Nav Then Tabs + + + + + + + + + + diff --git a/packages/core/src/components/nav/test/simple-nested-navs/index.html b/packages/core/src/components/nav/test/simple-nested-navs/index.html index f37e581795..746bcdbe67 100644 --- a/packages/core/src/components/nav/test/simple-nested-navs/index.html +++ b/packages/core/src/components/nav/test/simple-nested-navs/index.html @@ -13,7 +13,9 @@ - + + + Page One @@ -42,7 +44,9 @@ - + + + Page Two Section One @@ -51,12 +55,20 @@ Go to Page Two Section Two - - Go Back - +
+ Go Back +
`; + + const button = this.querySelector('ion-button.previous'); + button.addEventListener('click', () => { + const nav = this.closest('ion-nav'); + if (nav.parent) { + nav.parent.pop(); + } + }); } } @@ -66,7 +78,9 @@ - + + + Page Two Section Two @@ -75,9 +89,6 @@ Go to Page Three - - Go Back - `; @@ -90,7 +101,9 @@ - + + + Page Three