Skip to content

Instantly share code, notes, and snippets.


gdyrrahitis/auth.component.ts Secret

Created Aug 18, 2018
What would you like to do?
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