Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created August 18, 2018 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdyrrahitis/dce1aa4e61c43c54018d9756f85d24d1 to your computer and use it in GitHub Desktop.
Save gdyrrahitis/dce1aa4e61c43c54018d9756f85d24d1 to your computer and use it in GitHub Desktop.
export class AuthComponent implements OnInit {
private form: FormGroup;
private returnUrl: string;
constructor(private authService: AuthService, private router: Router,
private activated: ActivatedRoute) { }
ngOnInit() {
this.activated.queryParams.subscribe(params => {
this.returnUrl = params["returnUrl"];
});
this.form = new FormGroup({
username: new FormControl(null),
password: new FormControl(null)
});
}
ngSubmit() {
// code omitted to explain later
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment