From c15772651afa74d36accc53eef0e37e5eaea6801 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 4 Apr 2018 15:38:18 -0400 Subject: [PATCH] test(back-button): add a page with a menu and back button --- .../back-button/test/basic/index.html | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/core/src/components/back-button/test/basic/index.html b/core/src/components/back-button/test/basic/index.html index 53b3af5529..4295340660 100644 --- a/core/src/components/back-button/test/basic/index.html +++ b/core/src/components/back-button/test/basic/index.html @@ -86,11 +86,40 @@

Page Three

Custom back button

+ Go to Page Four
`; // okay cool, we're in the DOM now await nav.push(thirdPage); + + const nextButton = thirdPage.querySelector('ion-button .next'); + nextButton.addEventListener('click', async () => { + await goToPageFour(nav); + }); + } + + async function goToPageFour(nav) { + const fourthPage = document.createElement('div'); + fourthPage.classList.add('fourth-page'); + fourthPage.innerHTML = ` + + + + + + + Page Four + + + +

Page Four

+

Back button and menu button

+
+ `; + + // okay cool, we're in the DOM now + await nav.push(fourthPage); }