This article provides a step-by-step introduction to configure Syncfusion JavaScript (Essential JS 2) library and build it in the Meteor framework.
Meteor
using the following command line.on Windows:
choco install meteor
on OSX/LINUX:
curl https://install.meteor.com/ | sh
Refer to this documentation for more information about installing
Meteor
.
ej2-meteor
folder after installing Meteor
.meteor create ej2-meteor
ej2-meteor
, and install the required default dependencies from the command prompt.cd ej2-meteor
meteor npm install
@syncfusion/ej2
npm package in the application using the following command line.meteor npm install @syncfusion/ej2 --save
For getting started, the Calendar control will be added in the new application.
<div>
element inside the <body>
element in ~/client/main.html
file for rendering the Calender control.<head>
<title>ej2-meteor</title>
....
....
</head>
<body>
....
....
<h2>Essential JS 2 Calendar</h2>
<!--HTML element which is going to render as Essential JS 2 Calendar control-->
<div id="element"></div>
</body>
....
....
Meteor.startup
method in ~/src/client/main.js
file.....
....
import './main.html';
// import Syncfusion Essential JS 2 styles from node_modules
import '../node_modules/@syncfusion/ej2/material.css';
import { Calendar } from '@syncfusion/ej2-calendars';
Meteor.startup(() => {
// initialize calendar control
let calendarObject = new Calendar();
// render initialized calendar
calendarObject.appendTo('#element');
});
....
....
meteor
Open the localhost URL in the web brower.
The Calendar control will now be rendered in the browser.
If you face any memory issue when running the above command line, increase the memory by adding
TOOL_NODE_FLAGS --max-old-space-size=4096
system environment variable. Refer to this GitHub issue for more information.
Refer to this tutorial for running the Meteor
application in mobile emulator or simulator. Meteor on Windows does not support mobile builds, so this will not work on Windows.