Browse Source

UI: Fix login url params

pull/2604/head
Igor Kulikov 7 years ago
parent
commit
5e3c85a897
  1. 7
      ui-ngx/src/app/modules/login/pages/login/login.component.ts

7
ui-ngx/src/app/modules/login/pages/login/login.component.ts

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

Loading…
Cancel
Save