activated typescript strict mode
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {AbstractControl, FormControl, FormGroup, Validators} from '@angular/forms';
|
||||
import {FormControl, FormGroup, Validators} from '@angular/forms';
|
||||
import {Router} from '@angular/router';
|
||||
import {UserService} from '../../../services/user/user.service';
|
||||
import {faWindowRestore} from '@fortawesome/free-solid-svg-icons/faWindowRestore';
|
||||
@@ -10,18 +10,17 @@ import {faWindowRestore} from '@fortawesome/free-solid-svg-icons/faWindowRestore
|
||||
styleUrls: ['./password.component.less'],
|
||||
})
|
||||
export class PasswordComponent implements OnInit {
|
||||
public form: FormGroup;
|
||||
public errorMessage: string;
|
||||
public form: FormGroup = new FormGroup({
|
||||
user: new FormControl(null, [Validators.required, Validators.email]),
|
||||
});
|
||||
|
||||
public errorMessage = '';
|
||||
public faNewPassword = faWindowRestore;
|
||||
|
||||
public constructor(public userService: UserService, private router: Router) {}
|
||||
|
||||
public ngOnInit(): void {
|
||||
const required = (c: AbstractControl) => Validators.required(c);
|
||||
const email = Validators.email;
|
||||
this.form = new FormGroup({
|
||||
user: new FormControl(null, [required, email]),
|
||||
});
|
||||
this.form.reset();
|
||||
}
|
||||
|
||||
public async onResetPassword(): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user