From 0bf116932bf185e1db9e1c2b1a34dd89f4bfc58e Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 30 Aug 2025 11:19:17 +0200 Subject: [PATCH] adapted and refined the implementation of the component - Adapted the implementation to the project structure. - Moved the HTML code in a separate file. --- src/app/login/login.component.html | 16 +++++++++++++++- src/app/login/login.component.ts | 25 ++++++------------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html index 147cfc4..ae88858 100644 --- a/src/app/login/login.component.html +++ b/src/app/login/login.component.html @@ -1 +1,15 @@ -

login works!

+
+ +
+ +
+ +
+
{{ error }}
+
Welcome, {{ username }}! Your token is {{ token }}
diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index 30c71ee..a19edad 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -1,26 +1,13 @@ +import { Component } from '@angular/core'; import { Store } from '@ngrx/store'; -import { login } from './store/login.actions'; -import { selectToken, selectError, selectIsLoading } from './store/login.selectors'; +import { login } from '../store/login.actions'; +import { selectToken, selectError, selectIsLoading } from '../store/login.selectors'; @Component({ selector: 'app-login', - template: ` -
- -
- -
- -
-
{{ error }}
-
Welcome, {{ username }}! Your token is {{ token }}
- ` + imports: [], + templateUrl: './login.component.html', + styleUrl: './login.component.less' }) export class LoginComponent { username = ''; -- 2.20.1