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

11096
yarn.lock

File diff suppressed because it is too large Load Diff