fixed login dialog reporting issues and responsiveness problem
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ChangeDetectorRef, Component, inject } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
@@ -16,6 +16,7 @@ import { AuthService } from '../services/auth.service';
|
||||
export class LoginComponent {
|
||||
private auth = inject(AuthService);
|
||||
private router = inject(Router);
|
||||
private cdr = inject(ChangeDetectorRef);
|
||||
|
||||
username = '';
|
||||
password = '';
|
||||
@@ -42,6 +43,7 @@ export class LoginComponent {
|
||||
this.error = typeof body === 'string' ? body : 'Login failed. Please try again.';
|
||||
} finally {
|
||||
this.loading = false;
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user