Hi Alex,
Thanks for using Syncfusion products.
Please follow the steps to access and use EJ component instance inside Angular 2 component.
1. Refer the following typescript declaration files in the component file.
The above declaration files will contain the interfaces for accessing EJ component. You can find the above files in the below location.
Location: [Installation Directory]\Syncfusion\Essential Studio\XX.X.X.XX\JavaScript\assets\typescript
Where XX.X.X.XX defines the Essential studio version.
2. Define the component template and provide the template variable for Grid component as follows.
3. Include the ViewChild decorator and EJComponents in the component file as below.
4. Specify a property to access the grid directive instance as follows.
Now the ViewChild decorator will set the directive with name “grid” (template variable used in html) to the property grid. Use the property type as EJComponents<ej.Grid, any>.
The template variable will be evaluated into the property grid after the view get rendered. Hence make sure to use the property after the ngAfterViewInit callback.
5. Now we can access the grid instance as follows.
Please let us know if you have any queries.
Regards,
Madhu Sudhanan P.