We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ejDiagram: methods/properties can be accessed only after plugin

Thread ID:





133064 Oct 6,2017 06:38 PM UTC Oct 10,2017 03:55 AM UTC Angular 3
Tags: ejDiagram
Julian Lyndon-Smith
Asked On October 6, 2017 06:38 PM UTC

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");


<ej-diagram height="100%" id="graph">
<e-node name ="Start" type = "flow" shape="terminator" [width]="140" [height]="50" [offsetX]="300" [offsetY]="50">
<e-nodelabel text="Start"></e-nodelabel>
<e-node name ="Init" type = "flow" shape="process" [width]="140" [height]="50" [offsetX]="300" [offsetY]="140">
<e-nodelabel text="var i = 0;"></e-nodelabel>
<e-connector name="connector1" sourceNode="Start" targetNode="Init">
<e-segment type="orthogonal"></e-segment>


I tried to look at the events, but couldn't find any information

Shyam G [Syncfusion]
Replied On October 9, 2017 08:58 AM UTC

Hi Julian, 
Please use ngAfterViewInit method which triggers once the diagram is rendered. Please refer to the code example, sample and reference link to use that method. 
Code example: 
export class DiagramComponent implements AfterViewInit { 
            ngAfterViewInit() { 
                var diagram = $("#graph").ejDiagram("instance"); 
                var save=diagram.save(); 
Shyam G 

Julian Lyndon-Smith
Replied On October 9, 2017 09:03 AM UTC

thanks - this worked

Shyam G [Syncfusion]
Replied On October 10, 2017 03:55 AM UTC

Hi Julian, 
Please let us know if you need further assistance on this. 
Shyam G 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon