From bcd0f7186c7283e874198c39d9eecbb18304b999 Mon Sep 17 00:00:00 2001 From: Dan Bucholtz Date: Tue, 9 Jan 2018 15:09:30 -0600 Subject: [PATCH] refactor(): wrap templates in --- .../basic-inputs-page.component.html | 37 ++++++ .../conference-app/angular/package-lock.json | 20 +-- .../angular/src/app/app.component.html | 2 +- .../angular/src/app/app.component.ts | 17 ++- .../src/pages/about-popover/about-popover.ts | 2 + .../angular/src/pages/about/about.html | 96 +++++++------- .../angular/src/pages/account/account.html | 48 +++---- .../angular/src/pages/login/login.html | 90 ++++++------- .../angular/src/pages/map/map.html | 24 ++-- .../schedule-filter/schedule-filter.html | 58 +++++---- .../angular/src/pages/schedule/schedule.html | 121 +++++++++--------- .../pages/session-detail/session-detail.html | 38 +++--- .../angular/src/pages/signup/signup.html | 78 +++++------ .../pages/speaker-detail/speaker-detail.html | 42 +++--- .../src/pages/speaker-list/speaker-list.html | 118 ++++++++--------- .../angular/src/pages/support/support.html | 61 ++++----- .../src/pages/tabs-page/tabs-page.html | 30 +++-- .../angular/src/pages/tutorial/tutorial.html | 78 +++++------ 18 files changed, 516 insertions(+), 444 deletions(-) diff --git a/packages/demos/angular/src/app/basic-inputs-page/basic-inputs-page.component.html b/packages/demos/angular/src/app/basic-inputs-page/basic-inputs-page.component.html index dba7d8a3be..6740622cef 100644 --- a/packages/demos/angular/src/app/basic-inputs-page/basic-inputs-page.component.html +++ b/packages/demos/angular/src/app/basic-inputs-page/basic-inputs-page.component.html @@ -30,6 +30,24 @@ + + +

Search Input

+
+
+ + + + Ionic Text Input + + + + + Value: + {{searchValue}} + + +

Numeric Input

@@ -168,6 +186,25 @@
+ + + +

Segment

+
+
+ + + + + + + + + + Value: + {{segmentValue}} + + Home diff --git a/packages/demos/conference-app/angular/package-lock.json b/packages/demos/conference-app/angular/package-lock.json index d4bd828cd8..067f2c2391 100644 --- a/packages/demos/conference-app/angular/package-lock.json +++ b/packages/demos/conference-app/angular/package-lock.json @@ -68,7 +68,7 @@ "autoprefixer": "6.7.7", "chalk": "2.2.2", "circular-dependency-plugin": "4.3.0", - "common-tags": "1.6.0", + "common-tags": "1.7.0", "copy-webpack-plugin": "4.3.1", "core-object": "3.1.5", "css-loader": "0.28.8", @@ -284,17 +284,17 @@ "integrity": "sha512-i2j2J9KIobCqyX6LlrlYhaHgd7qmP1pzHs4XAthHgth8m6c4gsHsh+Pl3fqknD7AX18ghpqo3tVtv0EFhSFU3w==" }, "@ionic/angular": { - "version": "0.0.2-16", - "resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-0.0.2-16.tgz", - "integrity": "sha512-9ZS3GgO8X9G/df/2Pi9vZPgNyDYvsn2ees10Mt2u84SJC5Gf1OhbkLGiPbwVsOAxQV1qOgGCl50TXaXErNZj+A==", + "version": "0.0.2-17", + "resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-0.0.2-17.tgz", + "integrity": "sha512-o2w2l7Mc7CAsSdC/d268ODDqD0HQ+gxP9V0RTpcS+E0jBEXybOW5dG/a75fT7uccdxeiscTv3XkzsyQBCIJwYA==", "requires": { "@stencil/core": "0.1.1-0" } }, "@ionic/core": { - "version": "0.0.2-39", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-0.0.2-39.tgz", - "integrity": "sha512-v+dOmZjV3HAn26cBITBl7LqZXV4XOdeFwZR0GrlR7VHiNgC6HBGBtlF2/yOlnHuU5KPzTZLSVbia9BwmytCt4g==" + "version": "0.0.2-41", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-0.0.2-41.tgz", + "integrity": "sha512-7mBe4RbrvD+LDL5HaEsWe5p2WDM4xf4vE+cMHNzPmqFN6lx60c3XkA1twVXZBjfcarYTCqne3SvbbHGfOrkS9w==" }, "@ionic/storage": { "version": "2.1.3", @@ -1503,9 +1503,9 @@ "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" }, "common-tags": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.6.0.tgz", - "integrity": "sha512-sgmgEodNLbxnSSoR5a2xH23CoDJ9J5MKsJS/tqplfmJLpikG0oWMpAb+tM8ERQCMpp9I+ERf6SYl158G6GwX0w==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.7.0.tgz", + "integrity": "sha512-A63PFbYd8ccyVZbqZkWjQ9+BqSaROt/BCNesdhZZNjvUXx1U59fA+XDeaIJWqrgPsoIdmYds1qofDNDvrffw9Q==", "dev": true, "requires": { "babel-runtime": "6.26.0" diff --git a/packages/demos/conference-app/angular/src/app/app.component.html b/packages/demos/conference-app/angular/src/app/app.component.html index c6fb59b742..1dab24bab2 100644 --- a/packages/demos/conference-app/angular/src/app/app.component.html +++ b/packages/demos/conference-app/angular/src/app/app.component.html @@ -22,7 +22,7 @@ - + diff --git a/packages/demos/conference-app/angular/src/app/app.component.ts b/packages/demos/conference-app/angular/src/app/app.component.ts index e49697a4d6..14da6cc2d2 100644 --- a/packages/demos/conference-app/angular/src/app/app.component.ts +++ b/packages/demos/conference-app/angular/src/app/app.component.ts @@ -69,12 +69,15 @@ export class AppComponent implements OnInit { // Check if the user has already seen the tutorial this.storage.get('hasSeenTutorial') .then((hasSeenTutorial) => { + console.log('hasSeenTutorial: ', hasSeenTutorial); if (hasSeenTutorial) { this.rootPage = TabsPage; } else { this.rootPage = TutorialPage; } - // this.platformReady() + getNav(this.navRef).then((nav) => { + nav.setRoot(this.rootPage); + }); }); // load the conference data @@ -121,7 +124,9 @@ export class AppComponent implements OnInit { } openTutorial() { - return getNav(this.navRef).setRoot(TutorialPage); + return getNav(this.navRef).then((navElement) => { + navElement.setRoot(TutorialPage); + }); } listenToLoginEvents() { @@ -145,7 +150,7 @@ export class AppComponent implements OnInit { isActive(page: PageInterface) { return 'primary'; - //const childNav = getNav(this.navRef).getChildNavs()[0]; + // const childNav = getNav(this.navRef).getChildNavs()[0]; // Tabs are a special case because they have their own navigation /*if (childNav) { @@ -163,8 +168,10 @@ export class AppComponent implements OnInit { } } -function getNav(elementRef: ElementRef) { - return elementRef.nativeElement as HTMLIonNavElement; +function getNav(elementRef: ElementRef): Promise { + return (elementRef.nativeElement as any).componentOnReady().then(() => { + return elementRef.nativeElement as HTMLIonNavElement; + }); } export interface PageInterface { diff --git a/packages/demos/conference-app/angular/src/pages/about-popover/about-popover.ts b/packages/demos/conference-app/angular/src/pages/about-popover/about-popover.ts index 8c273bd7ba..97104dabcd 100644 --- a/packages/demos/conference-app/angular/src/pages/about-popover/about-popover.ts +++ b/packages/demos/conference-app/angular/src/pages/about-popover/about-popover.ts @@ -6,6 +6,7 @@ import { App } from '@ionic/angular'; @Component({ template: ` + Learn Ionic @@ -23,6 +24,7 @@ import { App } from '@ionic/angular'; Support + ` }) export class PopoverPage { diff --git a/packages/demos/conference-app/angular/src/pages/about/about.html b/packages/demos/conference-app/angular/src/pages/about/about.html index 237a779f60..319dc8d8fc 100644 --- a/packages/demos/conference-app/angular/src/pages/about/about.html +++ b/packages/demos/conference-app/angular/src/pages/about/about.html @@ -1,52 +1,54 @@ - - - - - - About - - - - + + + + + - - - + About - -
- ionic logo -
-
-

Ionic Conference

+ + + + + + + - - - - Date - - + +
+ ionic logo +
+
+

Ionic Conference

- - - Location - - Madison, WI - Austin, TX - Chicago, IL - Seattle, WA - - - + + + + Date + + -

- The Ionic Conference is a one-day conference featuring talks from the - Ionic team. It is focused on Ionic applications being built with - Ionic 2. This includes migrating apps from Ionic 1 to Ionic 2, - Angular concepts, Webpack, Sass, and many other technologies used - in Ionic 2. Tickets are completely sold out, and we’re expecting - more than 1000 developers – making this the largest Ionic - conference ever! -

-
-
+ + + Location + + Madison, WI + Austin, TX + Chicago, IL + Seattle, WA + + +
+ +

+ The Ionic Conference is a one-day conference featuring talks from the + Ionic team. It is focused on Ionic applications being built with + Ionic 2. This includes migrating apps from Ionic 1 to Ionic 2, + Angular concepts, Webpack, Sass, and many other technologies used + in Ionic 2. Tickets are completely sold out, and we’re expecting + more than 1000 developers – making this the largest Ionic + conference ever! +

+
+
+
\ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/account/account.html b/packages/demos/conference-app/angular/src/pages/account/account.html index 299e180f8d..9785712823 100644 --- a/packages/demos/conference-app/angular/src/pages/account/account.html +++ b/packages/demos/conference-app/angular/src/pages/account/account.html @@ -1,25 +1,27 @@ - - - - - - - - Account - - + + + + + + + + + Account + + - -
- avatar -

{{username}}

+ +
+ avatar +

{{username}}

- - Update Picture - Change Username - Change Password - Support - Logout - -
-
+ + Update Picture + Change Username + Change Password + Support + Logout + +
+
+
\ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/login/login.html b/packages/demos/conference-app/angular/src/pages/login/login.html index c82a80edc5..5dd42b9346 100644 --- a/packages/demos/conference-app/angular/src/pages/login/login.html +++ b/packages/demos/conference-app/angular/src/pages/login/login.html @@ -1,50 +1,52 @@ - - - - - - - + + + + + + + + - Login - - + Login + + - - + + -
- - - Username - - - -

- Username is required -

+ + + + Username + + + +

+ Username is required +

- - Password - - - -

- Password is required -

-
+ + Password + + + +

+ Password is required +

+
- - - - - - - - -
+ + + + + + + + + -
+
+ \ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/map/map.html b/packages/demos/conference-app/angular/src/pages/map/map.html index aa4f972a98..458f8a02bb 100644 --- a/packages/demos/conference-app/angular/src/pages/map/map.html +++ b/packages/demos/conference-app/angular/src/pages/map/map.html @@ -1,12 +1,14 @@ - - - - - - Map - - + + + + + + + Map + + - -
-
+ +
+
+
\ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/schedule-filter/schedule-filter.html b/packages/demos/conference-app/angular/src/pages/schedule-filter/schedule-filter.html index 94b5a87b13..2a63829151 100644 --- a/packages/demos/conference-app/angular/src/pages/schedule-filter/schedule-filter.html +++ b/packages/demos/conference-app/angular/src/pages/schedule-filter/schedule-filter.html @@ -1,36 +1,38 @@ - - - - Cancel - + + + + + Cancel + - - Filter Sessions - + + Filter Sessions + - - Done - - - + + Done + + + - + - - Tracks + + Tracks - - - {{track.name}} - - + + + {{track.name}} + + - + - - - Reset All Filters - - + + + Reset All Filters + + - + + \ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/schedule/schedule.html b/packages/demos/conference-app/angular/src/pages/schedule/schedule.html index c2ca96b058..3c73caf16b 100644 --- a/packages/demos/conference-app/angular/src/pages/schedule/schedule.html +++ b/packages/demos/conference-app/angular/src/pages/schedule/schedule.html @@ -1,64 +1,67 @@ - - - - - Menu - - + + + + + + Menu + + - - - All - - - Favorites - - + + + All + + + Favorites + + - - - - Filter - - - + + + + Filter + + + - - - - - - - -
- - - {{group.time}} - - - + + + + + + + Segment value is: {{segment}} + +
+ + + {{group.time}} + + + - -

{{session.name}}

-

- {{session.timeStart}} — - {{session.timeEnd}}: - {{session.location}} -

-
- - - Favorite - - - Remove - - -
-
-
-
\ No newline at end of file + +

{{session.name}}

+

+ {{session.timeStart}} — + {{session.timeEnd}}: + {{session.location}} +

+
+ + + Favorite + + + Remove + + +
+
+
+
+ \ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/session-detail/session-detail.html b/packages/demos/conference-app/angular/src/pages/session-detail/session-detail.html index 4511c48d89..92018f6ad0 100644 --- a/packages/demos/conference-app/angular/src/pages/session-detail/session-detail.html +++ b/packages/demos/conference-app/angular/src/pages/session-detail/session-detail.html @@ -1,19 +1,21 @@ - - - {{session.name}} - - + + + + {{session.name}} + + - -
-

{{session.name}}

-

- {{speaker.name}} -

-

- {{session.timeStart}} - {{session.timeEnd}} -

-

{{session.location}}

-

{{session.description}}

-
-
+ +
+

{{session.name}}

+

+ {{speaker.name}} +

+

+ {{session.timeStart}} - {{session.timeEnd}} +

+

{{session.location}}

+

{{session.description}}

+
+
+
\ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/signup/signup.html b/packages/demos/conference-app/angular/src/pages/signup/signup.html index d87e8dfb6c..13aa8e7763 100644 --- a/packages/demos/conference-app/angular/src/pages/signup/signup.html +++ b/packages/demos/conference-app/angular/src/pages/signup/signup.html @@ -1,44 +1,46 @@ - - - - - - - - Signup - - + + + + + + + + + Signup + + - + \ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/speaker-detail/speaker-detail.html b/packages/demos/conference-app/angular/src/pages/speaker-detail/speaker-detail.html index 774802ef3a..8a80aaf3f3 100644 --- a/packages/demos/conference-app/angular/src/pages/speaker-detail/speaker-detail.html +++ b/packages/demos/conference-app/angular/src/pages/speaker-detail/speaker-detail.html @@ -1,23 +1,25 @@ - - - {{speaker?.name}} - - + + + + {{speaker?.name}} + + - -
-
+ +
+
- - - - - - - - - -
+ + + + + + + + + +
-

{{speaker?.about}}

-
+

{{speaker?.about}}

+ +
\ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.html b/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.html index fab19eb2a7..f4e88a1492 100644 --- a/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.html +++ b/packages/demos/conference-app/angular/src/pages/speaker-list/speaker-list.html @@ -1,66 +1,68 @@ - - - - - - Speakers - - + + + + + + + Speakers + + - - - - + + + + - + - - - - - Speaker profile pic - - {{speaker.name}} - - - - - - -

{{session.name}}

+ + + + + Speaker profile pic + + {{speaker.name}} + - -

About {{speaker.name}}

-
-
-
+ + + +

{{session.name}}

+
- - - - - Tweet - - - - - - Share - - - - - - Contact - - - + +

About {{speaker.name}}

+
+
+
-
+ + + + + Tweet + + + + + + Share + + + + + + Contact + + + -
-
-
-
-
+ + + +
+
+
+
+
\ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/support/support.html b/packages/demos/conference-app/angular/src/pages/support/support.html index 565844764e..e964832f7a 100644 --- a/packages/demos/conference-app/angular/src/pages/support/support.html +++ b/packages/demos/conference-app/angular/src/pages/support/support.html @@ -1,35 +1,36 @@ - + + + + + + + + + Support + - - - - - - - Support - + - + + - - +
+ + + Enter your support message below + + + - - - - Enter your support message below - - - +

+ Support message is required +

-

- Support message is required -

- -
- Submit -
-
-
+
+ Submit +
+ +
+ \ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/tabs-page/tabs-page.html b/packages/demos/conference-app/angular/src/pages/tabs-page/tabs-page.html index 5c3ec9b738..be08f355de 100644 --- a/packages/demos/conference-app/angular/src/pages/tabs-page/tabs-page.html +++ b/packages/demos/conference-app/angular/src/pages/tabs-page/tabs-page.html @@ -1,14 +1,16 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/demos/conference-app/angular/src/pages/tutorial/tutorial.html b/packages/demos/conference-app/angular/src/pages/tutorial/tutorial.html index 52692cddff..8126bdd74c 100644 --- a/packages/demos/conference-app/angular/src/pages/tutorial/tutorial.html +++ b/packages/demos/conference-app/angular/src/pages/tutorial/tutorial.html @@ -1,44 +1,46 @@ - - - - Skip - - - + + + + + Skip + + + - - + + - - -

- Welcome to ICA -

-

- The ionic conference app is a practical preview of the ionic framework in action, and a demonstration of proper code use. -

-
+ + +

+ Welcome to ICA +

+

+ The ionic conference app is a practical preview of the ionic framework in action, and a demonstration of proper code use. +

+
- - -

What is Ionic?

-

Ionic Framework is an open source SDK that enables developers to build high quality mobile apps with web technologies like HTML, CSS, and JavaScript.

-
+ + +

What is Ionic?

+

Ionic Framework is an open source SDK that enables developers to build high quality mobile apps with web technologies like HTML, CSS, and JavaScript.

+
- - -

What is Ionic Pro?

-

Ionic Pro is a powerful set of services and features built on top of Ionic Framework that brings a totally new level of app development agility to mobile dev teams.

-
+ + +

What is Ionic Pro?

+

Ionic Pro is a powerful set of services and features built on top of Ionic Framework that brings a totally new level of app development agility to mobile dev teams.

+
- - -

Ready to Play?

- - Continue - - -
+ + +

Ready to Play?

+ + Continue + + +
-
-
+
+
+
\ No newline at end of file