1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-27 21:53:25 +00:00
Files
browser/src/app/settings/create-organization.component.ts
Oscar Hinton eff3332fef Upgrade Angular to 9 (#606)
* Upgrade Angular to 8

* Upgrade Angular to 9

* Fix format

* Fix import sorting
2020-08-17 10:04:38 -04:00

30 lines
944 B
TypeScript

import {
Component,
OnInit,
ViewChild,
} from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { OrganizationPlansComponent } from './organization-plans.component';
@Component({
selector: 'app-create-organization',
templateUrl: 'create-organization.component.html',
})
export class CreateOrganizationComponent implements OnInit {
@ViewChild(OrganizationPlansComponent, { static: true }) orgPlansComponent: OrganizationPlansComponent;
constructor(private route: ActivatedRoute) { }
ngOnInit() {
const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => {
if (qParams.plan === 'families' || qParams.plan === 'teams' || qParams.plan === 'enterprise') {
this.orgPlansComponent.plan = qParams.plan;
}
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}
}