TODO:selbst
authorKai Moritz <kai@juplo.de>
Sun, 29 Jun 2025 11:51:54 +0000 (13:51 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 6 Sep 2025 12:03:09 +0000 (14:03 +0200)
src/app/login/login.component.ts
src/app/store/login.actions.ts
src/app/store/login.reducers.ts

index a19edad..2ab7a69 100644 (file)
@@ -10,11 +10,11 @@ import { selectToken, selectError, selectIsLoading } from '../store/login.select
   styleUrl: './login.component.less'
 })
 export class LoginComponent {
-  username = '';
-  password = '';
-  token = '';
-  error = '';
-  isLoading = false;
+  username : string|undefined = undefined;
+  password : string|undefined = undefined;
+  token : string|undefined = undefined;
+  error : string|undefined = undefined;
+  isLoading : boolean = false;
 
   constructor(private store: Store) {
     this.store.select(selectToken).subscribe(token => (this.token = token));
index 784df9c..1319408 100644 (file)
@@ -2,7 +2,7 @@ import { createAction, props } from '@ngrx/store';
 
 export const login = createAction(
   '[Login] User Login',
-  props<{ username: string, password: string }>()
+  props<{ username: string|undefined, password: string|undefined }>()
 );
 
 export const loginSuccess = createAction(
index 903c45a..762ae8b 100644 (file)
@@ -2,8 +2,8 @@ import { createReducer, on } from '@ngrx/store';
 import { login, loginSuccess, loginFailure } from './login.actions';
 
 export interface State {
-  token: string;
-  error: string;
+  token: string|undefined;
+  error: string|undefined;
   isLoading: boolean;
 }