adjusted login and signup post operations to work with forms

added a jwt interceptor
This commit is contained in:
2020-07-30 17:14:45 +02:00
parent 48d620e878
commit 4f2c149f5a
14 changed files with 81 additions and 25 deletions

View 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;
}
}