update deprecated angular API's

This commit is contained in:
Rajnikant 2022-04-19 13:30:15 +05:30
parent 002569ed75
commit a172b7d41f
2 changed files with 14 additions and 11100 deletions

View File

@ -106,6 +106,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
public toolbarVisibility: boolean = true; public toolbarVisibility: boolean = true;
public symbolScaling: boolean = true; public symbolScaling: boolean = true;
private instance: ComponentRef<TopologySummaryComponent>; private instance: ComponentRef<TopologySummaryComponent>;
// private instance: any
tools = { tools = {
selection: true, selection: true,
@ -175,10 +176,16 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
private nodeConsoleService: NodeConsoleService, private nodeConsoleService: NodeConsoleService,
private symbolService: SymbolService, private symbolService: SymbolService,
private cd: ChangeDetectorRef, private cd: ChangeDetectorRef,
private cfr: ComponentFactoryResolver, // private cfr: ComponentFactoryResolver,
private injector: Injector // private injector: Injector,
private viewContainerRef: ViewContainerRef
) {} ) {}
// constructor(private viewContainerRef: ViewContainerRef) {}
// createMyComponent() {this.viewContainerRef.createComponent(MyComponent);}
ngOnInit() { ngOnInit() {
this.getSettings(); this.getSettings();
this.progressService.activate(); this.progressService.activate();
@ -221,8 +228,10 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
async lazyLoadTopologySummary() { async lazyLoadTopologySummary() {
if (this.isTopologySummaryVisible) { if (this.isTopologySummaryVisible) {
const {TopologySummaryComponent} = await import('../topology-summary/topology-summary.component'); const {TopologySummaryComponent} = await import('../topology-summary/topology-summary.component');
const componentFactory = this.cfr.resolveComponentFactory(TopologySummaryComponent); this.instance = this.viewContainerRef.createComponent(TopologySummaryComponent)
this.instance = this.topologySummaryContainer.createComponent(componentFactory, null, this.injector);
// const componentFactory = this.cfr.resolveComponentFactory(TopologySummaryComponent);
// this.instance = this.topologySummaryContainer.createComponent(componentFactory, null, this.injector);
this.instance.instance.server = this.server; this.instance.instance.server = this.server;
this.instance.instance.project = this.project; this.instance.instance.project = this.project;
} else if (this.instance) { } else if (this.instance) {
@ -471,6 +480,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
}; };
this.projectws.onerror = (event: MessageEvent) => { this.projectws.onerror = (event: MessageEvent) => {
debugger
this.toasterService.error(`Connection to host lost. Error: ${event.data}`); this.toasterService.error(`Connection to host lost. Error: ${event.data}`);
}; };
} }

11096
yarn.lock

File diff suppressed because it is too large Load Diff