-
-
Save gdyrrahitis/4f64d672aae313b65de75fbf9339b26c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ngSubmit() { | |
const username = this.form.get('username').value; | |
const password = this.form.get('password').value; | |
this.authService.authenticate(username, password).subscribe(() => { | |
const url = this.returnUrl || '/'; | |
this.router.navigate([url]); | |
}, (error) => { | |
this.form.setErrors({ | |
notAuthorized: true | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment