adjusted login and signup post operations to work with forms
added a jwt interceptor
This commit is contained in:
11
src/app/account/signup/password-error-state-matcher.ts
Normal file
11
src/app/account/signup/password-error-state-matcher.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { ErrorStateMatcher } from '@angular/material/core';
|
||||
import { FormControl, FormGroupDirective, NgForm } from '@angular/forms';
|
||||
|
||||
export class PasswordErrorStateMatcher implements ErrorStateMatcher {
|
||||
isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {
|
||||
const invalidControl = !!(control && control.invalid && control.parent.touched);
|
||||
const invalidParent = !!(control && control.parent && control.parent.invalid && control.parent.touched);
|
||||
|
||||
return invalidControl || invalidParent;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user