Role verification open modal in after view init
This commit is contained in:
parent
b91f8a1ab5
commit
a5de5eb83e
|
@ -1,4 +1,4 @@
|
||||||
import {Component, Input, OnDestroy, OnInit, ViewChild} from "@angular/core";
|
import {AfterViewInit, Component, Input, OnDestroy, OnInit, ViewChild} from "@angular/core";
|
||||||
import {User} from "../login/utils/helper.class";
|
import {User} from "../login/utils/helper.class";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {UserManagementService} from "../services/user-management.service";
|
import {UserManagementService} from "../services/user-management.service";
|
||||||
|
@ -81,7 +81,7 @@ import {Composer} from "../utils/email/composer";
|
||||||
</modal-alert>
|
</modal-alert>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class RoleVerificationComponent implements OnInit, OnDestroy {
|
export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public id: string;
|
public id: string;
|
||||||
|
@ -112,6 +112,9 @@ export class RoleVerificationComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
ngAfterViewInit() {
|
||||||
this.subs.push(this.route.queryParams.subscribe(params => {
|
this.subs.push(this.route.queryParams.subscribe(params => {
|
||||||
if (params && params['verify']) {
|
if (params && params['verify']) {
|
||||||
this.subs.push(this.userManagementService.getUserInfo(false).subscribe(user => {
|
this.subs.push(this.userManagementService.getUserInfo(false).subscribe(user => {
|
||||||
|
|
Loading…
Reference in New Issue