Commit 5e3c85a8974f99e38ebbb08b03b5501090bb4572

Authored by Igor Kulikov
1 parent cc123a9e

UI: Fix login url params

... ... @@ -23,7 +23,7 @@ import { FormBuilder } from '@angular/forms';
23 23 import { HttpErrorResponse } from '@angular/common/http';
24 24 import { Constants } from '@shared/models/constants';
25 25 import { Router } from '@angular/router';
26   -import { ActivatedRoute } from "@angular/router";
  26 +import { ActivatedRoute } from '@angular/router';
27 27
28 28 @Component({
29 29 selector: 'tb-login',
... ... @@ -46,8 +46,9 @@ export class LoginComponent extends PageComponent implements OnInit {
46 46 }
47 47
48 48 ngOnInit() {
49   - if (this.route.snapshot.queryParams["username"] && this.route.snapshot.queryParams["password"]) {
50   - this.loginFormGroup.setValue({username: this.route.snapshot.queryParams["username"], password: this.route.snapshot.queryParams["password"]});
  49 + if (this.route.snapshot.queryParams.username && this.route.snapshot.queryParams.password) {
  50 + this.loginFormGroup.setValue({username: this.route.snapshot.queryParams.username,
  51 + password: this.route.snapshot.queryParams.password});
51 52 this.login();
52 53 }
53 54 }
... ...