Ajout de style
This commit is contained in:
@@ -36,17 +36,19 @@ export class LoginUserComponent implements OnInit {
|
||||
username: ["", [Validators.required, Validators.minLength(3)]],
|
||||
password: [
|
||||
"",
|
||||
[Validators.required, Validators.pattern("^[A-Za-z0-9_-]{8,15}$")]
|
||||
[
|
||||
Validators.required /*, Validators.pattern("^[A-Za-z0-9_-]{8,15}$")*/
|
||||
]
|
||||
]
|
||||
},
|
||||
{ updateOn: "blur" }
|
||||
{ updateOn: "submit" }
|
||||
);
|
||||
|
||||
// get return url from route parameters or default to '/'
|
||||
this.returnUrl = this.route.snapshot.queryParams["returnUrl"] || "/";
|
||||
}
|
||||
|
||||
get loginCtrls() {
|
||||
get formCtrls() {
|
||||
return this.loginForm.controls;
|
||||
}
|
||||
|
||||
@@ -60,7 +62,7 @@ export class LoginUserComponent implements OnInit {
|
||||
|
||||
this.loading = true;
|
||||
this.authenticationService
|
||||
.login(this.loginCtrls.username.value, this.loginCtrls.password.value)
|
||||
.login(this.formCtrls.username.value, this.formCtrls.password.value)
|
||||
.pipe(first())
|
||||
.subscribe(
|
||||
data => {
|
||||
|
||||
Reference in New Issue
Block a user