Skip to content

Instantly share code, notes, and snippets.

@Priyesha
Created April 21, 2020 10:46
Show Gist options
  • Save Priyesha/db718c2d5fe3173fca9502f0c491baee to your computer and use it in GitHub Desktop.
Save Priyesha/db718c2d5fe3173fca9502f0c491baee to your computer and use it in GitHub Desktop.
public addDynamicNode(node: any) {
const factory = this.factoryResolver.resolveComponentFactory(DynamicNodeComponent);
const component = factory.create(this.rootViewContainer.parentInjector);
(<any>component.instance).node = node;
(<any>component.instance).jsPlumbInstance = this.jsPlumbInstance;
this.rootViewContainer.insert(component.hostView);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment