From d30a8951f68c753c8a6dcda572dd621dd7624553 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sun, 10 Jun 2018 00:30:56 +0200 Subject: [PATCH] Externalize HTML templates in separate files. --- src/login/login.tmpl.html | 38 ----------------------------- src/login/loginForm.component.html | 29 ++++++++++++++++++++++ src/login/loginForm.component.ts | 32 +----------------------- src/login/loginModal.component.html | 17 +++++++++++++ src/login/loginModal.component.ts | 22 +++-------------- 5 files changed, 50 insertions(+), 88 deletions(-) delete mode 100644 src/login/login.tmpl.html create mode 100644 src/login/loginForm.component.html create mode 100644 src/login/loginModal.component.html diff --git a/src/login/login.tmpl.html b/src/login/login.tmpl.html deleted file mode 100644 index 64a54ef..0000000 --- a/src/login/login.tmpl.html +++ /dev/null @@ -1,38 +0,0 @@ - - diff --git a/src/login/loginForm.component.html b/src/login/loginForm.component.html new file mode 100644 index 0000000..25d0125 --- /dev/null +++ b/src/login/loginForm.component.html @@ -0,0 +1,29 @@ +
+
+ + +
+ + +
+

The email is required.

+
+
+
+ +
+ + +
+ + +
+

The password is required.

+
+
+
+
diff --git a/src/login/loginForm.component.ts b/src/login/loginForm.component.ts index 1dc2f3a..c660e48 100644 --- a/src/login/loginForm.component.ts +++ b/src/login/loginForm.component.ts @@ -7,37 +7,7 @@ import { Login } from './login'; @Component({ selector: 'login-form', exportAs: 'loginForm', - template: ` -
-
- - -
- - -
-

The email is required.

-
-
-
- -
- - -
- - -
-

The password is required.

-
-
-
-
- ` + templateUrl: './loginForm.component.html' }) export class LoginFormComponent { diff --git a/src/login/loginModal.component.html b/src/login/loginModal.component.html new file mode 100644 index 0000000..c5dbabb --- /dev/null +++ b/src/login/loginModal.component.html @@ -0,0 +1,17 @@ + + + + + diff --git a/src/login/loginModal.component.ts b/src/login/loginModal.component.ts index 8ff7abd..5572bf2 100644 --- a/src/login/loginModal.component.ts +++ b/src/login/loginModal.component.ts @@ -2,31 +2,15 @@ import { Component, Input, ViewChild } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +//import { jqxWindowComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxwindow'; +import { jqxButtonComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxbuttons'; import { Login } from './login'; import { LoginFormComponent } from './loginForm.component'; @Component({ selector: 'login-modal', - template: ` - - - - - - ` + templateUrl: './loginModal.component.html' }) export class LoginModalComponent { @ViewChild('loginForm') loginForm: LoginFormComponent;