From ac4ab0d7673d39d9ab063a71f69d1138e52c4a04 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Mon, 26 Mar 2018 16:34:09 -0500 Subject: [PATCH] test(angular): update ionic/angular test app --- angular/test/nav/.angular-cli.json | 6 +- .../action-sheet-page.component.ts | 2 +- .../app/action-sheet/action-sheet.module.ts | 7 +- .../nav/src/app/alert/alert-page.component.ts | 2 +- .../test/nav/src/app/alert/alert.module.ts | 7 +- angular/test/nav/src/app/app.module.ts | 7 +- .../nav/src/app/badge/badge-page.component.ts | 139 ++++++++------- .../test/nav/src/app/badge/badge.module.ts | 9 +- .../basic-inputs-page.component.spec.ts | 9 +- .../basic-inputs-page.module.ts | 11 +- angular/test/nav/src/app/card/card.module.ts | 7 +- .../nav/src/app/content/content.module.ts | 7 +- .../form-sample-page.component.html | 168 +++++++++--------- .../form-sample-page.module.ts | 9 +- .../group-inputs-page.component.spec.ts | 11 +- .../group-inputs-page.module.ts | 9 +- .../app/home-page/home-page.component.html | 134 +++++++------- .../nav/src/app/home-page/home-page.module.ts | 4 +- .../src/app/loading/loading-page.component.ts | 2 +- .../nav/src/app/loading/loading.module.ts | 7 +- .../nav/src/app/modal/modal-page.component.ts | 2 +- .../test/nav/src/app/modal/modal.module.ts | 12 +- .../no-routing-nav/no-routing-nav.module.ts | 9 +- .../src/app/popover/popover-page.component.ts | 2 +- .../nav/src/app/popover/popover.module.ts | 9 +- .../nav/src/app/segment/segment.module.ts | 9 +- .../app/show-hide-when/show-hide-when.html | 2 +- .../show-hide-when/show-hide-when.module.ts | 7 +- .../page-one/page-one-routing.module.ts | 5 +- .../simple-nav/page-one/page-one.module.ts | 7 +- .../page-three/page-three-routing.module.ts | 5 +- .../page-three/page-three.module.ts | 5 +- .../app/simple-nav/page-three/page-three.ts | 26 ++- .../page-two/page-two-routing.module.ts | 5 +- .../simple-nav/page-two/page-two.module.ts | 12 +- .../src/app/simple-nav/page-two/page-two.ts | 6 +- .../simple-nav/simple-nav-routing.module.ts | 5 +- .../src/app/simple-nav/simple-nav.module.ts | 9 +- .../nav/src/app/toast/toast-page.component.ts | 2 +- .../test/nav/src/app/toast/toast.module.ts | 7 +- .../virtual-scroll/virtual-scroll.module.ts | 9 +- angular/test/nav/src/index.html | 7 +- 42 files changed, 359 insertions(+), 360 deletions(-) diff --git a/angular/test/nav/.angular-cli.json b/angular/test/nav/.angular-cli.json index 038f91c1e5..a19a666634 100644 --- a/angular/test/nav/.angular-cli.json +++ b/angular/test/nav/.angular-cli.json @@ -10,7 +10,11 @@ "assets": [ "assets", "favicon.ico", - { "glob": "**/*", "input": "../node_modules/@ionic/core/dist", "output": "./ionic/core" } + { + "glob": "**/*", + "input": "../node_modules/@ionic/angular/dist/ionic", + "output": "./ionic" + } ], "index": "index.html", "main": "main.ts", diff --git a/angular/test/nav/src/app/action-sheet/action-sheet-page.component.ts b/angular/test/nav/src/app/action-sheet/action-sheet-page.component.ts index c970ccdf61..b7a0f3eca4 100644 --- a/angular/test/nav/src/app/action-sheet/action-sheet-page.component.ts +++ b/angular/test/nav/src/app/action-sheet/action-sheet-page.component.ts @@ -8,7 +8,7 @@ import { ActionSheetController } from '@ionic/angular'; - Test + Action Sheet diff --git a/angular/test/nav/src/app/action-sheet/action-sheet.module.ts b/angular/test/nav/src/app/action-sheet/action-sheet.module.ts index 5b159ff609..7dcfaf33c6 100644 --- a/angular/test/nav/src/app/action-sheet/action-sheet.module.ts +++ b/angular/test/nav/src/app/action-sheet/action-sheet.module.ts @@ -1,15 +1,16 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; import { ActionSheetPageComponent } from './action-sheet-page.component'; import { ActionSheetRoutingModule } from './action-sheet-routing.module'; @NgModule({ imports: [ CommonModule, + IonicModule, ActionSheetRoutingModule ], - declarations: [ActionSheetPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [ActionSheetPageComponent] }) export class ActionSheetModule { } diff --git a/angular/test/nav/src/app/alert/alert-page.component.ts b/angular/test/nav/src/app/alert/alert-page.component.ts index c68a635323..c88daf7020 100644 --- a/angular/test/nav/src/app/alert/alert-page.component.ts +++ b/angular/test/nav/src/app/alert/alert-page.component.ts @@ -8,7 +8,7 @@ import { AlertController } from '@ionic/angular'; - Test + Alert diff --git a/angular/test/nav/src/app/alert/alert.module.ts b/angular/test/nav/src/app/alert/alert.module.ts index c9c9ee516f..0466d0d82d 100644 --- a/angular/test/nav/src/app/alert/alert.module.ts +++ b/angular/test/nav/src/app/alert/alert.module.ts @@ -1,15 +1,16 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; import { AlertPageComponent } from './alert-page.component'; import { AlertRoutingModule } from './alert-routing.module'; @NgModule({ imports: [ CommonModule, + IonicModule, AlertRoutingModule ], - declarations: [AlertPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [AlertPageComponent] }) export class AlertModule { } diff --git a/angular/test/nav/src/app/app.module.ts b/angular/test/nav/src/app/app.module.ts index cd159c0a54..343bdae8c9 100644 --- a/angular/test/nav/src/app/app.module.ts +++ b/angular/test/nav/src/app/app.module.ts @@ -1,12 +1,12 @@ import { BrowserModule } from '@angular/platform-browser'; -import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; +import { NgModule } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; import { PostTestService } from './post-test/post-test.service'; -import { IonicAngularModule } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; @NgModule({ declarations: [AppComponent], @@ -14,10 +14,9 @@ import { IonicAngularModule } from '@ionic/angular'; AppRoutingModule, BrowserModule, HttpClientModule, - IonicAngularModule.forRoot(), + IonicModule.forRoot(), ], bootstrap: [AppComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA], providers: [PostTestService] }) export class AppModule { } diff --git a/angular/test/nav/src/app/badge/badge-page.component.ts b/angular/test/nav/src/app/badge/badge-page.component.ts index c6c33e76f1..1f12e66504 100644 --- a/angular/test/nav/src/app/badge/badge-page.component.ts +++ b/angular/test/nav/src/app/badge/badge-page.component.ts @@ -1,83 +1,86 @@ -import { Component } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; +import { Badge } from '@ionic/angular'; @Component({ selector: 'app-badge-page', template: ` - - - Badges - - - - - Badges Right - - 99 - Default Badge - - - 99 - Primary Badge - - - 99 - Secondary Badge - - - 99 - Danger Badge - - - 99 - Light Badge - - - 99 - Dark Badge - - - {{dynamicColor}} - Dynamic Badge Color (toggle) - - + + + Badges + + + + + Badges Right + + 99 + Default Badge + + + 99 + Primary Badge + + + 99 + Secondary Badge + + + 99 + Danger Badge + + + 99 + Light Badge + + + 99 + Dark Badge + + + {{dynamicColor}} + Dynamic Badge Color (toggle) + + - - Badges Left - - 99 - Default Badge - - - 99 - Primary Badge - - - 99 - Secondary Badge - - - 99 - Danger Badge - - - 99 - Light Badge - - - 99 - Dark Badge - - - - + + Badges Left + + 99 + Default Badge + + + 99 + Primary Badge + + + 99 + Secondary Badge + + + 99 + Danger Badge + + + 99 + Light Badge + + + 99 + Dark Badge + + + + ` }) export class BadgePageComponent { dynamicColor = 'primary'; - constructor() { + @ViewChild(Badge) badge: Badge; + ngOnInit() { + console.log(this.badge); } toggleColor() { diff --git a/angular/test/nav/src/app/badge/badge.module.ts b/angular/test/nav/src/app/badge/badge.module.ts index 5843275a9e..04d24889b4 100644 --- a/angular/test/nav/src/app/badge/badge.module.ts +++ b/angular/test/nav/src/app/badge/badge.module.ts @@ -1,15 +1,16 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; import { BadgePageComponent } from './badge-page.component'; import { BadgeRoutingModule } from './badge-routing.module'; @NgModule({ imports: [ CommonModule, - BadgeRoutingModule + BadgeRoutingModule, + IonicModule ], - declarations: [BadgePageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [BadgePageComponent] }) export class BadgeModule { } diff --git a/angular/test/nav/src/app/basic-inputs-page/basic-inputs-page.component.spec.ts b/angular/test/nav/src/app/basic-inputs-page/basic-inputs-page.component.spec.ts index 78bb8829b7..ac0e23cd62 100644 --- a/angular/test/nav/src/app/basic-inputs-page/basic-inputs-page.component.spec.ts +++ b/angular/test/nav/src/app/basic-inputs-page/basic-inputs-page.component.spec.ts @@ -1,8 +1,7 @@ -import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; -import { IonicAngularModule } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { BasicInputsPageComponent } from './basic-inputs-page.component'; @@ -14,8 +13,10 @@ describe('InputsTestPageComponent', () => { async(() => { TestBed.configureTestingModule({ declarations: [BasicInputsPageComponent], - imports: [FormsModule, IonicAngularModule.forRoot()], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + imports: [ + FormsModule, + IonicModule.forRoot() + ], }).compileComponents(); }) ); diff --git a/angular/test/nav/src/app/basic-inputs-page/basic-inputs-page.module.ts b/angular/test/nav/src/app/basic-inputs-page/basic-inputs-page.module.ts index c4e60de2dc..5697f62e15 100644 --- a/angular/test/nav/src/app/basic-inputs-page/basic-inputs-page.module.ts +++ b/angular/test/nav/src/app/basic-inputs-page/basic-inputs-page.module.ts @@ -1,7 +1,7 @@ -import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { IonicAngularModule } from '@ionic/angular'; +import { FormsModule } from '@angular/forms'; +import { IonicModule } from '@ionic/angular'; import { BasicInputsPageComponent } from './basic-inputs-page.component'; import { BasicInputsPageRoutingModule } from './basic-inputs-page-routing.module'; @@ -11,9 +11,8 @@ import { BasicInputsPageRoutingModule } from './basic-inputs-page-routing.module BasicInputsPageRoutingModule, CommonModule, FormsModule, - IonicAngularModule + IonicModule ], - declarations: [BasicInputsPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [BasicInputsPageComponent] }) export class BasicInputsPageModule {} diff --git a/angular/test/nav/src/app/card/card.module.ts b/angular/test/nav/src/app/card/card.module.ts index 1a8d312bf8..6c4638f3ec 100644 --- a/angular/test/nav/src/app/card/card.module.ts +++ b/angular/test/nav/src/app/card/card.module.ts @@ -1,15 +1,16 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; import { CardPageComponent } from './card-page.component'; import { CardRoutingModule } from './card-routing.module'; @NgModule({ imports: [ CommonModule, + IonicModule, CardRoutingModule ], - declarations: [CardPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [CardPageComponent] }) export class CardModule { } diff --git a/angular/test/nav/src/app/content/content.module.ts b/angular/test/nav/src/app/content/content.module.ts index 1ce1245c4d..09a8de3b0e 100644 --- a/angular/test/nav/src/app/content/content.module.ts +++ b/angular/test/nav/src/app/content/content.module.ts @@ -1,15 +1,16 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; import { ContentPageComponent } from './content-page.component'; import { ContentRoutingModule } from './content-routing.module'; @NgModule({ imports: [ CommonModule, + IonicModule, ContentRoutingModule ], - declarations: [ContentPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [ContentPageComponent] }) export class ContentModule { } diff --git a/angular/test/nav/src/app/form-sample-page/form-sample-page.component.html b/angular/test/nav/src/app/form-sample-page/form-sample-page.component.html index ca9ef492cf..4286a8206f 100644 --- a/angular/test/nav/src/app/form-sample-page/form-sample-page.component.html +++ b/angular/test/nav/src/app/form-sample-page/form-sample-page.component.html @@ -1,88 +1,88 @@ -
- - - Sample Form - - - - + + + + Sample Form + + + + + + First Name + + + + First Name is required + First Name must be at least 2 characters long + + + Last Name + + + + Last Name is required + Last Name must be at least 4 characters long + + + Desired Job Title + + Cat Herder + Nerf Herder (Scruffy) + Cat + Trier of Things + + + + Job Title is required + + + I Would Like To: + + + Drink the Beers + + + + Drink the Teas + + + + Make the Coffees + + + + Feed the Engineers + + - First Name - - - - First Name is required - First Name must be at least 2 characters long - - - Last Name - - - - Last Name is required - Last Name must be at least 4 characters long - - - Desired Job Title - - Cat Herder - Nerf Herder (Scruffy) - Cat - Trier of Things - - - - Job Title is required - - - I Would Like To: - - - Drink the Beers - - - - Drink the Teas - - - - Make the Coffees - - - - Feed the Engineers - - - - Short Self Description - - - - Self Description is required - Please tell us more - - - Desired Salary - - - - Desired Salary is required - - - My Level of Happy - - - - - - - - - - - - Looks Good to Me - + Short Self Description + + + + Self Description is required + Please tell us more + + + Desired Salary + + + + Desired Salary is required + + + My Level of Happy + + + + + + + + + + + + Looks Good to Me +
diff --git a/angular/test/nav/src/app/form-sample-page/form-sample-page.module.ts b/angular/test/nav/src/app/form-sample-page/form-sample-page.module.ts index 8079b12541..af96c78a02 100644 --- a/angular/test/nav/src/app/form-sample-page/form-sample-page.module.ts +++ b/angular/test/nav/src/app/form-sample-page/form-sample-page.module.ts @@ -1,7 +1,7 @@ -import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; +import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; -import { IonicAngularModule } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { FormSamplePageComponent } from './form-sample-page.component'; import { FormSamplePageRoutingModule } from './form-sample-page-routing.module'; @@ -11,9 +11,8 @@ import { FormSamplePageRoutingModule } from './form-sample-page-routing.module'; FormSamplePageRoutingModule, CommonModule, FormsModule, - IonicAngularModule + IonicModule ], - declarations: [FormSamplePageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [FormSamplePageComponent] }) export class FormSamplePageModule {} diff --git a/angular/test/nav/src/app/group-inputs-page/group-inputs-page.component.spec.ts b/angular/test/nav/src/app/group-inputs-page/group-inputs-page.component.spec.ts index aa5922a6b2..93a0987b57 100644 --- a/angular/test/nav/src/app/group-inputs-page/group-inputs-page.component.spec.ts +++ b/angular/test/nav/src/app/group-inputs-page/group-inputs-page.component.spec.ts @@ -1,7 +1,6 @@ -import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; -import { IonicAngularModule } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { GroupInputsPageComponent } from './group-inputs-page.component'; @@ -12,9 +11,11 @@ describe('GroupInputsPageComponent', () => { beforeEach( async(() => { TestBed.configureTestingModule({ - imports: [FormsModule, IonicAngularModule], - declarations: [GroupInputsPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + imports: [ + FormsModule, + IonicModule + ], + declarations: [GroupInputsPageComponent] }).compileComponents(); }) ); diff --git a/angular/test/nav/src/app/group-inputs-page/group-inputs-page.module.ts b/angular/test/nav/src/app/group-inputs-page/group-inputs-page.module.ts index bb0d0c128c..23dd11f537 100644 --- a/angular/test/nav/src/app/group-inputs-page/group-inputs-page.module.ts +++ b/angular/test/nav/src/app/group-inputs-page/group-inputs-page.module.ts @@ -1,7 +1,7 @@ -import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; -import { IonicAngularModule } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { GroupInputsPageComponent } from './group-inputs-page.component'; import { GroupInputsPageRoutingModule } from './group-inputs-page-routing.module'; @@ -11,9 +11,8 @@ import { GroupInputsPageRoutingModule } from './group-inputs-page-routing.module CommonModule, FormsModule, GroupInputsPageRoutingModule, - IonicAngularModule + IonicModule ], - declarations: [GroupInputsPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [GroupInputsPageComponent] }) export class GroupInputsPageModule {} diff --git a/angular/test/nav/src/app/home-page/home-page.component.html b/angular/test/nav/src/app/home-page/home-page.component.html index 76e03dd8dd..db47174e60 100644 --- a/angular/test/nav/src/app/home-page/home-page.component.html +++ b/angular/test/nav/src/app/home-page/home-page.component.html @@ -1,66 +1,74 @@ -
- Ionic Core Angular Demo Application -
-
- -
+

+ @ionic/angular tests +

-
-

Nav Tests

- +

Overlays

+ -
+ +

Inputs

+ + + +

Navigation

+ + + +

Content

+ diff --git a/angular/test/nav/src/app/home-page/home-page.module.ts b/angular/test/nav/src/app/home-page/home-page.module.ts index b71b8b3f3c..660c2763db 100644 --- a/angular/test/nav/src/app/home-page/home-page.module.ts +++ b/angular/test/nav/src/app/home-page/home-page.module.ts @@ -1,13 +1,15 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; import { HomePageComponent } from './home-page.component'; import { HomePageRoutingModule } from './home-page-routing.module'; @NgModule({ imports: [ CommonModule, - HomePageRoutingModule + HomePageRoutingModule, + IonicModule ], declarations: [HomePageComponent] }) diff --git a/angular/test/nav/src/app/loading/loading-page.component.ts b/angular/test/nav/src/app/loading/loading-page.component.ts index 77156642cc..d5bf4e5c8d 100644 --- a/angular/test/nav/src/app/loading/loading-page.component.ts +++ b/angular/test/nav/src/app/loading/loading-page.component.ts @@ -8,7 +8,7 @@ import { LoadingController } from '@ionic/angular'; - Test + Loading diff --git a/angular/test/nav/src/app/loading/loading.module.ts b/angular/test/nav/src/app/loading/loading.module.ts index fe720af1bc..a9cc1c0639 100644 --- a/angular/test/nav/src/app/loading/loading.module.ts +++ b/angular/test/nav/src/app/loading/loading.module.ts @@ -1,15 +1,16 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; import { LoadingPageComponent } from './loading-page.component'; import { LoadingRoutingModule } from './loading-routing.module'; @NgModule({ imports: [ CommonModule, + IonicModule, LoadingRoutingModule ], - declarations: [LoadingPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [LoadingPageComponent] }) export class LoadingModule { } diff --git a/angular/test/nav/src/app/modal/modal-page.component.ts b/angular/test/nav/src/app/modal/modal-page.component.ts index 011f41cc28..1141450662 100644 --- a/angular/test/nav/src/app/modal/modal-page.component.ts +++ b/angular/test/nav/src/app/modal/modal-page.component.ts @@ -9,7 +9,7 @@ import { ModalPageToPresent } from './modal-page-to-present'; - Test + Modal diff --git a/angular/test/nav/src/app/modal/modal.module.ts b/angular/test/nav/src/app/modal/modal.module.ts index c3ac5116e3..6f9dd62b1c 100644 --- a/angular/test/nav/src/app/modal/modal.module.ts +++ b/angular/test/nav/src/app/modal/modal.module.ts @@ -1,27 +1,23 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { IonicAngularModule } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { ModalPageComponent } from './modal-page.component'; import { ModalRoutingModule } from './modal-routing.module'; - import { ModalPageToPresent } from './modal-page-to-present'; @NgModule({ imports: [ CommonModule, - IonicAngularModule.forRoot(), + IonicModule.forRoot(), ModalRoutingModule ], declarations: [ ModalPageComponent, ModalPageToPresent ], - providers: [ - ], entryComponents: [ ModalPageToPresent - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + ] }) export class ModalModule { } diff --git a/angular/test/nav/src/app/no-routing-nav/no-routing-nav.module.ts b/angular/test/nav/src/app/no-routing-nav/no-routing-nav.module.ts index 0bf7233673..4012e49c88 100755 --- a/angular/test/nav/src/app/no-routing-nav/no-routing-nav.module.ts +++ b/angular/test/nav/src/app/no-routing-nav/no-routing-nav.module.ts @@ -1,9 +1,9 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; import { NoRoutingNavPageComponent } from './no-routing-nav.component'; import { NoRoutingNavRoutingModule } from './no-routing-nav-routing.module'; -import { IonicAngularModule } from '@ionic/angular'; import { PageOne } from './pages/page-one'; import { PageTwo } from './pages/page-two'; @@ -13,7 +13,7 @@ import { PageThree } from './pages/page-three'; imports: [ CommonModule, NoRoutingNavRoutingModule, - IonicAngularModule, + IonicModule, ], declarations: [ NoRoutingNavPageComponent, @@ -25,7 +25,6 @@ import { PageThree } from './pages/page-three'; PageOne, PageTwo, PageThree - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + ] }) export class NoRoutingNavModule { } diff --git a/angular/test/nav/src/app/popover/popover-page.component.ts b/angular/test/nav/src/app/popover/popover-page.component.ts index 63fdf95624..5ef5e7fb9d 100644 --- a/angular/test/nav/src/app/popover/popover-page.component.ts +++ b/angular/test/nav/src/app/popover/popover-page.component.ts @@ -9,7 +9,7 @@ import { PopoverPageToPresent } from './popover-page-to-present'; - Test + Popover No event passed diff --git a/angular/test/nav/src/app/popover/popover.module.ts b/angular/test/nav/src/app/popover/popover.module.ts index 2dd056e632..1f83ef55ec 100644 --- a/angular/test/nav/src/app/popover/popover.module.ts +++ b/angular/test/nav/src/app/popover/popover.module.ts @@ -1,6 +1,6 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { IonicAngularModule } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { PopoverPageComponent } from './popover-page.component'; import { PopoverRoutingModule } from './popover-routing.module'; @@ -10,7 +10,7 @@ import { PopoverPageToPresent } from './popover-page-to-present'; @NgModule({ imports: [ CommonModule, - IonicAngularModule.forRoot(), + IonicModule.forRoot(), PopoverRoutingModule ], declarations: [ @@ -21,7 +21,6 @@ import { PopoverPageToPresent } from './popover-page-to-present'; ], entryComponents: [ PopoverPageToPresent - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + ] }) export class PopoverModule { } diff --git a/angular/test/nav/src/app/segment/segment.module.ts b/angular/test/nav/src/app/segment/segment.module.ts index ffd07dbed8..03d94eaa5c 100644 --- a/angular/test/nav/src/app/segment/segment.module.ts +++ b/angular/test/nav/src/app/segment/segment.module.ts @@ -1,7 +1,7 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; -import { IonicAngularModule } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { SegmentPageComponent } from './segment-page.component'; import { SegmentRoutingModule } from './segment-routing.module'; @@ -11,9 +11,8 @@ import { SegmentRoutingModule } from './segment-routing.module'; CommonModule, FormsModule, SegmentRoutingModule, - IonicAngularModule + IonicModule ], - declarations: [SegmentPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [SegmentPageComponent] }) export class SegmentModule { } diff --git a/angular/test/nav/src/app/show-hide-when/show-hide-when.html b/angular/test/nav/src/app/show-hide-when/show-hide-when.html index eca1918cf5..b0801c6e3b 100644 --- a/angular/test/nav/src/app/show-hide-when/show-hide-when.html +++ b/angular/test/nav/src/app/show-hide-when/show-hide-when.html @@ -1,7 +1,7 @@ - Test + Show/Hide When diff --git a/angular/test/nav/src/app/show-hide-when/show-hide-when.module.ts b/angular/test/nav/src/app/show-hide-when/show-hide-when.module.ts index ce0bb86760..27eb465211 100644 --- a/angular/test/nav/src/app/show-hide-when/show-hide-when.module.ts +++ b/angular/test/nav/src/app/show-hide-when/show-hide-when.module.ts @@ -1,15 +1,16 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; import { ShowHideWhenComponent } from './show-hide-when-page.component'; import { ShowHideWhenRoutingModule } from './show-hide-when-routing.module'; @NgModule({ imports: [ CommonModule, + IonicModule, ShowHideWhenRoutingModule ], - declarations: [ShowHideWhenComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [ShowHideWhenComponent] }) export class ShowHideWhenModule { } diff --git a/angular/test/nav/src/app/simple-nav/page-one/page-one-routing.module.ts b/angular/test/nav/src/app/simple-nav/page-one/page-one-routing.module.ts index 25ae75ef7d..4a69963ba4 100755 --- a/angular/test/nav/src/app/simple-nav/page-one/page-one-routing.module.ts +++ b/angular/test/nav/src/app/simple-nav/page-one/page-one-routing.module.ts @@ -1,6 +1,7 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; +import { IonicModule } from '@ionic/angular'; import { PageOne } from './page-one'; const routes: Routes = [ @@ -8,7 +9,7 @@ const routes: Routes = [ ]; @NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] + imports: [RouterModule.forChild(routes), IonicModule], + exports: [RouterModule, IonicModule] }) export class PageOneRoutingModule { } diff --git a/angular/test/nav/src/app/simple-nav/page-one/page-one.module.ts b/angular/test/nav/src/app/simple-nav/page-one/page-one.module.ts index 91b73d4c54..1d59670f10 100755 --- a/angular/test/nav/src/app/simple-nav/page-one/page-one.module.ts +++ b/angular/test/nav/src/app/simple-nav/page-one/page-one.module.ts @@ -1,4 +1,4 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { PageOne } from './page-one'; @@ -9,9 +9,6 @@ import { PageOneRoutingModule } from './page-one-routing.module'; CommonModule, PageOneRoutingModule ], - declarations: [PageOne], - schemas: [ - CUSTOM_ELEMENTS_SCHEMA - ] + declarations: [PageOne] }) export class PageOneModule { } diff --git a/angular/test/nav/src/app/simple-nav/page-three/page-three-routing.module.ts b/angular/test/nav/src/app/simple-nav/page-three/page-three-routing.module.ts index d534208893..3975d0f66a 100755 --- a/angular/test/nav/src/app/simple-nav/page-three/page-three-routing.module.ts +++ b/angular/test/nav/src/app/simple-nav/page-three/page-three-routing.module.ts @@ -1,6 +1,7 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; +import { IonicModule } from '@ionic/angular'; import { PageThree } from './page-three'; const routes: Routes = [ @@ -8,7 +9,7 @@ const routes: Routes = [ ]; @NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] + imports: [RouterModule.forChild(routes), IonicModule], + exports: [RouterModule, IonicModule] }) export class PageThreeRoutingModule { } diff --git a/angular/test/nav/src/app/simple-nav/page-three/page-three.module.ts b/angular/test/nav/src/app/simple-nav/page-three/page-three.module.ts index 1f75e6350f..269fb41814 100755 --- a/angular/test/nav/src/app/simple-nav/page-three/page-three.module.ts +++ b/angular/test/nav/src/app/simple-nav/page-three/page-three.module.ts @@ -1,4 +1,4 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { PageThree } from './page-three'; @@ -11,9 +11,6 @@ import { PageThreeRoutingModule } from './page-three-routing.module'; ], declarations: [ PageThree - ], - schemas: [ - CUSTOM_ELEMENTS_SCHEMA ] }) export class PageThreeModule { } diff --git a/angular/test/nav/src/app/simple-nav/page-three/page-three.ts b/angular/test/nav/src/app/simple-nav/page-three/page-three.ts index 1b6cc4e64a..c9e6032da6 100755 --- a/angular/test/nav/src/app/simple-nav/page-three/page-three.ts +++ b/angular/test/nav/src/app/simple-nav/page-three/page-three.ts @@ -1,4 +1,5 @@ import { Component, ViewEncapsulation } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'page-three', @@ -9,32 +10,29 @@ import { Component, ViewEncapsulation } from '@angular/core'; - Page Three {{ts}} -
isProd: {{isProd}}
paramOne: {{paramOne}}
paramTwo: {{paramTwo}}
- Go Back + Go to Page One +
+
+ Go to Page Two
` }) export class PageThree { - ts: number; - isProd = false; paramOne: any = null; paramTwo: any = null; - // constructor(private navController: NavController, private navParams: NavParams) { + constructor(private route: ActivatedRoute) {} - // this.isProd = navParams.get('isProd'); - // this.paramOne = navParams.get('paramOne'); - // this.paramTwo = navParams.get('paramTwo'); - - // setInterval(() => { - // this.ts = Date.now(); - // }, 500); - // } + ngOnInit() { + this.route.params.subscribe(params => { + this.paramOne = params['paramOne']; + this.paramTwo = params['paramTwo']; + }); + } } diff --git a/angular/test/nav/src/app/simple-nav/page-two/page-two-routing.module.ts b/angular/test/nav/src/app/simple-nav/page-two/page-two-routing.module.ts index 4700b6c8b5..2ecc49c80b 100755 --- a/angular/test/nav/src/app/simple-nav/page-two/page-two-routing.module.ts +++ b/angular/test/nav/src/app/simple-nav/page-two/page-two-routing.module.ts @@ -1,6 +1,7 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; +import { IonicModule } from '@ionic/angular'; import { PageTwo } from './page-two'; const routes: Routes = [ @@ -11,7 +12,7 @@ const routes: Routes = [ ]; @NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] + imports: [RouterModule.forChild(routes), IonicModule], + exports: [RouterModule, IonicModule] }) export class PageTwoRoutingModule { } diff --git a/angular/test/nav/src/app/simple-nav/page-two/page-two.module.ts b/angular/test/nav/src/app/simple-nav/page-two/page-two.module.ts index 65450c1e2a..989ad69f89 100755 --- a/angular/test/nav/src/app/simple-nav/page-two/page-two.module.ts +++ b/angular/test/nav/src/app/simple-nav/page-two/page-two.module.ts @@ -1,10 +1,7 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { - IonicAngularModule, -} from '@ionic/angular'; - +import { IonicModule } from '@ionic/angular'; import { PageTwo } from './page-two'; import { PageTwoRoutingModule } from './page-two-routing.module'; @@ -13,13 +10,10 @@ import { PageTwoRoutingModule } from './page-two-routing.module'; imports: [ CommonModule, PageTwoRoutingModule, - IonicAngularModule, + IonicModule, ], declarations: [ PageTwo, - ], - schemas: [ - CUSTOM_ELEMENTS_SCHEMA ] }) export class PageTwoModule { } diff --git a/angular/test/nav/src/app/simple-nav/page-two/page-two.ts b/angular/test/nav/src/app/simple-nav/page-two/page-two.ts index 86a9ce4269..f0c3cc9703 100755 --- a/angular/test/nav/src/app/simple-nav/page-two/page-two.ts +++ b/angular/test/nav/src/app/simple-nav/page-two/page-two.ts @@ -11,12 +11,12 @@ import { Location } from '@angular/common'; - Page Two - {{ts}} + Page Two
- Go to Page Three + Go to Page Three
- Go Back + Go to Page One
` diff --git a/angular/test/nav/src/app/simple-nav/simple-nav-routing.module.ts b/angular/test/nav/src/app/simple-nav/simple-nav-routing.module.ts index 5a4ad2c1b3..12fdb4ff07 100755 --- a/angular/test/nav/src/app/simple-nav/simple-nav-routing.module.ts +++ b/angular/test/nav/src/app/simple-nav/simple-nav-routing.module.ts @@ -1,6 +1,7 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; +import { IonicModule } from '@ionic/angular'; import { SimpleNavPageComponent } from './simple-nav.component'; const routes: Routes = [ @@ -16,7 +17,7 @@ const routes: Routes = [ ]; @NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] + imports: [RouterModule.forChild(routes), IonicModule], + exports: [RouterModule, IonicModule] }) export class SimpleNavRoutingModule { } diff --git a/angular/test/nav/src/app/simple-nav/simple-nav.module.ts b/angular/test/nav/src/app/simple-nav/simple-nav.module.ts index 2da989f7c7..3f887c5247 100755 --- a/angular/test/nav/src/app/simple-nav/simple-nav.module.ts +++ b/angular/test/nav/src/app/simple-nav/simple-nav.module.ts @@ -1,10 +1,10 @@ +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; +import { IonicModule } from '@ionic/angular'; import { SimpleNavPageComponent } from './simple-nav.component'; import { SimpleNavRoutingModule } from './simple-nav-routing.module'; -import { IonicAngularModule } from '@ionic/angular'; @NgModule({ declarations: [ @@ -12,9 +12,8 @@ import { IonicAngularModule } from '@ionic/angular'; ], imports: [ CommonModule, - IonicAngularModule, + IonicModule, SimpleNavRoutingModule - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + ] }) export class SimpleNavModule {} diff --git a/angular/test/nav/src/app/toast/toast-page.component.ts b/angular/test/nav/src/app/toast/toast-page.component.ts index 4d30ef393c..0e4187f78b 100644 --- a/angular/test/nav/src/app/toast/toast-page.component.ts +++ b/angular/test/nav/src/app/toast/toast-page.component.ts @@ -8,7 +8,7 @@ import { ToastController } from '@ionic/angular'; - Test + Toast diff --git a/angular/test/nav/src/app/toast/toast.module.ts b/angular/test/nav/src/app/toast/toast.module.ts index f4a52d051b..f7f9afd1e2 100644 --- a/angular/test/nav/src/app/toast/toast.module.ts +++ b/angular/test/nav/src/app/toast/toast.module.ts @@ -1,15 +1,16 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; import { ToastPageComponent } from './toast-page.component'; import { ToastRoutingModule } from './toast-routing.module'; @NgModule({ imports: [ CommonModule, + IonicModule, ToastRoutingModule ], - declarations: [ToastPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [ToastPageComponent] }) export class ToastModule { } diff --git a/angular/test/nav/src/app/virtual-scroll/virtual-scroll.module.ts b/angular/test/nav/src/app/virtual-scroll/virtual-scroll.module.ts index 0e979309a2..1d47f3519d 100644 --- a/angular/test/nav/src/app/virtual-scroll/virtual-scroll.module.ts +++ b/angular/test/nav/src/app/virtual-scroll/virtual-scroll.module.ts @@ -1,17 +1,16 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { IonicAngularModule } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { VirtualScrollPageComponent } from './virtual-scroll-page.component'; import { VirtualScrollRoutingModule } from './virtual-scroll-routing.module'; @NgModule({ imports: [ CommonModule, - IonicAngularModule, + IonicModule, VirtualScrollRoutingModule ], - declarations: [VirtualScrollPageComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] + declarations: [VirtualScrollPageComponent] }) export class VirtualScrollModule { } diff --git a/angular/test/nav/src/index.html b/angular/test/nav/src/index.html index fdcc3fd0b6..aa06306139 100644 --- a/angular/test/nav/src/index.html +++ b/angular/test/nav/src/index.html @@ -2,15 +2,10 @@ - Demo + Angular - - -