From c902206e229f96cc1aea740f74e8ae40de219a16 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Sun, 16 Oct 2016 15:23:50 +0200 Subject: [PATCH] test(nav): navPush use cases references #8727 --- .../nav/test/nav-push-pop/app-module.ts | 64 +++++++++ .../nav/test/nav-push-pop/main.html | 121 ++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 src/components/nav/test/nav-push-pop/app-module.ts create mode 100644 src/components/nav/test/nav-push-pop/main.html diff --git a/src/components/nav/test/nav-push-pop/app-module.ts b/src/components/nav/test/nav-push-pop/app-module.ts new file mode 100644 index 0000000000..f1a06ad01f --- /dev/null +++ b/src/components/nav/test/nav-push-pop/app-module.ts @@ -0,0 +1,64 @@ +import { Component, NgModule } from '@angular/core'; + +import { IonicApp, IonicModule, NavParams } from '../../../..'; + + + +@Component({ + template: ` + + + Second Page + + + +{{msg}} +` +}) +export class SecondPage { + msg: string = ''; + constructor(params: NavParams) { + this.msg = params.get('msg'); + } +} + + + +@Component({ + templateUrl: 'main.html' +}) +export class E2EPage { + pushPage: any = SecondPage; + visible: boolean = false; + + ionViewDidEnter() { + this.visible = true; + } +} + + +@Component({ + template: '' +}) +export class E2EApp { + root = E2EPage; +} + +@NgModule({ + declarations: [ + E2EApp, + E2EPage, + SecondPage + ], + imports: [ + IonicModule.forRoot(E2EApp) + ], + bootstrap: [IonicApp], + entryComponents: [ + E2EApp, + E2EPage, + SecondPage + ] +}) +export class AppModule {} + diff --git a/src/components/nav/test/nav-push-pop/main.html b/src/components/nav/test/nav-push-pop/main.html new file mode 100644 index 0000000000..ef74bd30e4 --- /dev/null +++ b/src/components/nav/test/nav-push-pop/main.html @@ -0,0 +1,121 @@ + + + + navPush use cases + + + + + + + +

+ Is visible: {{visible}} +

+

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ + + + Toggle Visible + + + + +

+ a (always visible) +

+ +

+ a (p *ngIf="visible") +

+ +

+ a (a *ngIf="visible") +

+ +

+ a (p *ngIf="!visible") +

+ +

+ a (a *ngIf="!visible") +

+ +

+ NO ion-button +

+ +

+ a (always visible) +

+ +

+ a (p *ngIf="visible") +

+ +

+ a (a *ngIf="visible") +

+ +

+ a (p *ngIf="!visible") +

+ +

+ a (a *ngIf="!visible") +

+