Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis

gdyrrahitis/auth.component.ts Secret

Created Aug 18, 2018
Embed
What would you like to do?
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
You can’t perform that action at this time.