mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-21 22:07:48 +00:00
update deprecated angular API's
This commit is contained in:
parent
002569ed75
commit
a172b7d41f
@ -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}`);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user