diff --git a/src/components/nav/test/child-navs/app.module.ts b/src/components/nav/test/child-navs/app.module.ts deleted file mode 100644 index 0ed34ddeda..0000000000 --- a/src/components/nav/test/child-navs/app.module.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { NgModule, Component } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { IonicApp, IonicModule, NavController } from '../../../..'; - -@Component({ - template: ``, -}) -export class E2EApp { - root = LandingPage; -} - -@Component({ - template: ` - - - - Landing Page Comp - - - - - - - - ` -}) -export class LandingPage { - - constructor(public navCtrl: NavController) {} - - goToPage() { - this.navCtrl.push(FirstPage); - } -} - -@Component({ - template: ` - - - - First Page Comp - - - - - -

Sub Header First Page

- -
- ` -}) -export class FirstPage { - root = SecondPage; -} - -@Component({ - template: ` - - - - Second Page Comp - - - - - -

Sub Header Second Page

- -
- ` -}) -export class SecondPage { - root = ThirdPage; -} - -@Component({ - template: ` - - - - Third Page Comp - - - - - -

Sub Header Third Page

- -
- ` -}) -export class ThirdPage { - root = FourthPage; -} - -@Component({ - template: ` - - - - {{item}} - - - - ` -}) -export class FourthPage { - items: string[]; - - ionViewWillEnter() { - let items: string[] = []; - for ( let i = 0 ; i < 500; i++ ) { - items.push(`Item ${(i + 1)}`); - } - this.items = items; - } -} - -@NgModule({ - declarations: [ - E2EApp, - LandingPage, - FirstPage, - SecondPage, - ThirdPage, - FourthPage - ], - imports: [ - BrowserModule, - IonicModule.forRoot(E2EApp) - ], - bootstrap: [IonicApp], - entryComponents: [ - E2EApp, - LandingPage, - FirstPage, - SecondPage, - ThirdPage, - FourthPage - ] -}) -export class AppModule {} diff --git a/src/components/nav/test/child-navs/app/app.component.ts b/src/components/nav/test/child-navs/app/app.component.ts new file mode 100644 index 0000000000..6c84f6d770 --- /dev/null +++ b/src/components/nav/test/child-navs/app/app.component.ts @@ -0,0 +1,8 @@ +import { Component } from '@angular/core'; + +@Component({ + template: ``, +}) +export class E2EApp { + root = 'LandingPage'; +} diff --git a/src/components/nav/test/child-navs/app/app.module.ts b/src/components/nav/test/child-navs/app/app.module.ts new file mode 100644 index 0000000000..d378d0ff24 --- /dev/null +++ b/src/components/nav/test/child-navs/app/app.module.ts @@ -0,0 +1,28 @@ +import { NgModule, Component } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { IonicApp, IonicModule } from '../../../../..'; + +import { E2EApp } from './app.component'; + +@NgModule({ + declarations: [ + E2EApp, + ], + imports: [ + BrowserModule, + IonicModule.forRoot(E2EApp, {}, { + links: [ + { loadChildren: '../pages/landing-page/landing-page.module#LandingPageModule', name: 'LandingPage' }, + { loadChildren: '../pages/first-page/first-page.module#FirstPageModule', name: 'FirstPage' }, + { loadChildren: '../pages/second-page/second-page.module#SecondPageModule', name: 'SecondPage' }, + { loadChildren: '../pages/third-page/third-page.module#ThirdPageModule', name: 'ThirdPage' }, + { loadChildren: '../pages/fourth-page/fourth-page.module#FourthPageModule', name: 'FourthPage' }, + ] + }) + ], + bootstrap: [IonicApp], + entryComponents: [ + E2EApp, + ] +}) +export class AppModule {} diff --git a/src/components/nav/test/child-navs/main.ts b/src/components/nav/test/child-navs/app/main.ts similarity index 100% rename from src/components/nav/test/child-navs/main.ts rename to src/components/nav/test/child-navs/app/main.ts diff --git a/src/components/nav/test/child-navs/pages/first-page/first-page.module.ts b/src/components/nav/test/child-navs/pages/first-page/first-page.module.ts new file mode 100644 index 0000000000..9c46c3e6b8 --- /dev/null +++ b/src/components/nav/test/child-navs/pages/first-page/first-page.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { DeepLinkModule } from '../../../../../..'; + +import { FirstPage } from './first-page'; + +@NgModule({ + declarations: [ + FirstPage, + ], + imports: [ + DeepLinkModule.forChild(FirstPage) + ], + entryComponents: [ + FirstPage, + ] +}) +export class FirstPageModule {} diff --git a/src/components/nav/test/child-navs/pages/first-page/first-page.ts b/src/components/nav/test/child-navs/pages/first-page/first-page.ts new file mode 100644 index 0000000000..f1463835d7 --- /dev/null +++ b/src/components/nav/test/child-navs/pages/first-page/first-page.ts @@ -0,0 +1,21 @@ +import { Component } from '@angular/core'; + +@Component({ + template: ` + + + + First Page Comp + + + + + +

Sub Header First Page

+ +
+ ` +}) +export class FirstPage { + root = 'SecondPage'; +} diff --git a/src/components/nav/test/child-navs/pages/fourth-page/fourth-page.module.ts b/src/components/nav/test/child-navs/pages/fourth-page/fourth-page.module.ts new file mode 100644 index 0000000000..94378e59b8 --- /dev/null +++ b/src/components/nav/test/child-navs/pages/fourth-page/fourth-page.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { DeepLinkModule } from '../../../../../..'; + +import { FourthPage } from './fourth-page'; + +@NgModule({ + declarations: [ + FourthPage, + ], + imports: [ + DeepLinkModule.forChild(FourthPage) + ], + entryComponents: [ + FourthPage, + ] +}) +export class FourthPageModule {} diff --git a/src/components/nav/test/child-navs/pages/fourth-page/fourth-page.ts b/src/components/nav/test/child-navs/pages/fourth-page/fourth-page.ts new file mode 100644 index 0000000000..985b2a4b45 --- /dev/null +++ b/src/components/nav/test/child-navs/pages/fourth-page/fourth-page.ts @@ -0,0 +1,24 @@ +import { Component } from '@angular/core'; + +@Component({ + template: ` + + + + {{item}} + + + + ` +}) +export class FourthPage { + items: string[]; + + ionViewWillEnter() { + let items: string[] = []; + for ( let i = 0 ; i < 500; i++ ) { + items.push(`Item ${(i + 1)}`); + } + this.items = items; + } +} diff --git a/src/components/nav/test/child-navs/pages/landing-page/landing-page.module.ts b/src/components/nav/test/child-navs/pages/landing-page/landing-page.module.ts new file mode 100644 index 0000000000..b67e742ae9 --- /dev/null +++ b/src/components/nav/test/child-navs/pages/landing-page/landing-page.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { DeepLinkModule } from '../../../../../..'; + +import { LandingPage } from './landing-page'; + +@NgModule({ + declarations: [ + LandingPage, + ], + imports: [ + DeepLinkModule.forChild(LandingPage) + ], + entryComponents: [ + LandingPage, + ] +}) +export class LandingPageModule {} diff --git a/src/components/nav/test/child-navs/pages/landing-page/landing-page.ts b/src/components/nav/test/child-navs/pages/landing-page/landing-page.ts new file mode 100644 index 0000000000..5271c8360b --- /dev/null +++ b/src/components/nav/test/child-navs/pages/landing-page/landing-page.ts @@ -0,0 +1,28 @@ +import { Component } from '@angular/core'; +import { NavController } from '../../../../../..'; + +@Component({ + template: ` + + + + Landing Page Comp + + + + + + + + ` +}) +export class LandingPage { + + constructor(public navCtrl: NavController) {} + + goToPage() { + this.navCtrl.push('FirstPage'); + } +} diff --git a/src/components/nav/test/child-navs/pages/second-page/second-page.module.ts b/src/components/nav/test/child-navs/pages/second-page/second-page.module.ts new file mode 100644 index 0000000000..2a50d15984 --- /dev/null +++ b/src/components/nav/test/child-navs/pages/second-page/second-page.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { DeepLinkModule } from '../../../../../..'; + +import { SecondPage } from './second-page'; + +@NgModule({ + declarations: [ + SecondPage, + ], + imports: [ + DeepLinkModule.forChild(SecondPage) + ], + entryComponents: [ + SecondPage, + ] +}) +export class SecondPageModule {} diff --git a/src/components/nav/test/child-navs/pages/second-page/second-page.ts b/src/components/nav/test/child-navs/pages/second-page/second-page.ts new file mode 100644 index 0000000000..df70aad0f1 --- /dev/null +++ b/src/components/nav/test/child-navs/pages/second-page/second-page.ts @@ -0,0 +1,21 @@ +import { Component } from '@angular/core'; + +@Component({ + template: ` + + + + Second Page Comp + + + + + +

Sub Header Second Page

+ +
+ ` +}) +export class SecondPage { + root = 'ThirdPage'; +} diff --git a/src/components/nav/test/child-navs/pages/third-page/third-page.module.ts b/src/components/nav/test/child-navs/pages/third-page/third-page.module.ts new file mode 100644 index 0000000000..283b69fb4f --- /dev/null +++ b/src/components/nav/test/child-navs/pages/third-page/third-page.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { DeepLinkModule } from '../../../../../..'; + +import { ThirdPage } from './third-page'; + +@NgModule({ + declarations: [ + ThirdPage, + ], + imports: [ + DeepLinkModule.forChild(ThirdPage) + ], + entryComponents: [ + ThirdPage, + ] +}) +export class ThirdPageModule {} diff --git a/src/components/nav/test/child-navs/pages/third-page/third-page.ts b/src/components/nav/test/child-navs/pages/third-page/third-page.ts new file mode 100644 index 0000000000..cbdc664f57 --- /dev/null +++ b/src/components/nav/test/child-navs/pages/third-page/third-page.ts @@ -0,0 +1,21 @@ +import { Component } from '@angular/core'; + +@Component({ + template: ` + + + + Third Page Comp + + + + + +

Sub Header Third Page

+ +
+ ` +}) +export class ThirdPage { + root = 'FourthPage'; +}