I was trying to look at the json produced by the :save() method in the `OnNgInit` method of my component, but get this error instead :
ejDiagram: methods/properties can be accessed only after plugin
How do I wait for the "after plugin" before attempting to access :save() ?
public ngOnInit() {
const diagram = $("#graph").ejDiagram("instance");
console.log(diagram.save())
}
<ej-diagram height="100%" id="graph">
<e-nodes>
<e-node name ="Start" type = "flow" shape="terminator" [width]="140" [height]="50" [offsetX]="300" [offsetY]="50">
<e-nodelabels>
<e-nodelabel text="Start"></e-nodelabel>
</e-nodelabels>
</e-node>
<e-node name ="Init" type = "flow" shape="process" [width]="140" [height]="50" [offsetX]="300" [offsetY]="140">
<e-nodelabels>
<e-nodelabel text="var i = 0;"></e-nodelabel>
</e-nodelabels>
</e-node>
</e-nodes>
<e-connectors>
<e-connector name="connector1" sourceNode="Start" targetNode="Init">
<e-segments>
<e-segment type="orthogonal"></e-segment>
</e-segments>
</e-connector>
</e-connectors>
</ej-diagram>
I tried to look at the events, but couldn't find any information