import $ from '/scripts/jquery-1.11.3.min.js'; import es from '/scripts/jquery.easing.1.3.min.js'; import jr from '/scripts/jsrender.min.js'; import ej from '/scripts/ej/ej.web.all.min'; |
For your reference, we have showcased our Grid control in the ES-2016 Kit application (given in the getting started) of Aurelia and the same can be downloaded from the below link.
Sample: http://www.syncfusion.com/downloads/support/forum/122134/ze/kit-es2016939935986
In the ‘app.html’ page, we have initialized the HTML tags, that needs to be rendered as EJ components. In the ‘app.js’ file present in the ‘src’ folder, we have declared the Grid component. Please refer the below code,
app.html: <template> <section class="au-animate"> <div id="grid"></div> </section> </template> app.js: export class App { attached(){ $('#grid').ejGrid({ dataSource: gridData, ------- ------- }); } } |
As you can see, we have declared the components in the method ‘attached’. This will be triggered once the corresponding DOM is attached to the View. You can find more information form the Aurelia documentation.
Once the HTML tags are written to the DOM, we can declare our components and it will render successfully. You can run the application by navigating to the application directory in command prompt and by specifying ‘gulp watch’. Please refer the Aurelia official website, if you want to know about how to run the Aurelia application.
Please let us know if you have any further concerns.
Regards,
Ajith R