You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Integrating Syncfusion Angular Components with Angular and Electron Applications
2
2
3
3
This document helps you to create a simple Angular application with `Electron Framework` and `Syncfusion Angular UI components`.
4
4
5
5
## Prerequisites
6
6
7
-
Before getting started with the Angular project with Syncfusion Angular Components in Electron, check whether the following are installed in the developer machine.
7
+
Before getting started with the Angular project, make sure you have the following installed on your machine,
8
8
9
-
* Angular Versions supported - 4+
10
-
* Typescript Versions supported - 2.6+
11
-
* Electron CLI - 6.0.10+
9
+
*[System requirements for Syncfusion Angular UI components](https://ej2.syncfusion.com/angular/documentation/system-requirement)
10
+
* Electron CLI version - `^22.x.x` or later
12
11
13
-
>Note: If the `electron CLI`is not installed, refer to [`getting started with electron`](https://www.npmjs.com/package/electron-cli) to install it.
12
+
If you do not have the `Electron CLI` installed, refer to the [`Electron package`](https://www.npmjs.com/package/electron-cli) for instructions on how to install it.
14
13
15
-
## Setup Angular environment
14
+
## Getting started with Syncfusion Angular component
16
15
17
-
You can use Angular CLI to setup your Angular applications. To install Angular CLI use the following command.
16
+
Follow the [documentation](https://ej2.syncfusion.com/angular/documentation/getting-started/angular-cli)to create an Angular application that includes Syncfusion Angular components.
18
17
19
-
```bash
20
-
npm install -g @angular/cli
21
-
```
22
-
23
-
## Create an application
24
-
25
-
Create a new project with the following command using the command prompt.
26
-
27
-
```bash
28
-
ng new my-app
29
-
cd my-app
30
-
```
31
-
32
-
Install electron framework using the following command
33
-
34
-
```bash
35
-
npm install -g electron
36
-
```
37
-
38
-
>Note: Here we are using electron version 6.0.10 to support angular 6 .
39
-
40
-
>Note: Also refer the below [getting started](https://electronjs.org/docs/tutorial/installation) to install electron framework.
41
-
42
-
## Installing Syncfusion Menu package
43
-
44
-
Syncfusion packages are distributed in npm as `@syncfusion` scoped packages. You can get all the angular syncfusion package from npm [link](https://www.npmjs.com/search?q=%40syncfusion%2Fej2-angular-).
45
-
46
-
To install Menu package, use the following command.
After installing the package, the component modules are available to configure into your application from Syncfusion installed
57
-
package. Syncfusion Angular package provides two different types of ng-Modules.
58
-
59
-
Refer to [`Ng Module`](https://ej2.syncfusion.com/angular/documentation/common/ng-module.html) to learn about `ngModules`.
60
-
61
-
Import Menu module into Angular application(app.module.ts) from the package `@syncfusion/ej2-angular-navigations`.
18
+
## Create main.js file
62
19
20
+
Create a `main.js` file in the root folder of the project and update the below code, This file will serve as an entry-point for Electron and it is responsible for creating windows and handling all the system events that might occur in the app.
Then, Include the above code in `package.json` file.
208
-
209
-
## Update tsconfig.json
210
-
211
-
In `tsconfig.json` file, change the target as
212
-
213
-
```typescript
214
-
"target": "es5"
215
-
```
216
-
217
75
## Running the application
218
76
219
-
Finally, run the following command line to start the application. The Syncfusion Essential JS 2 menu component will be rendered in the electron framework.
77
+
Finally, run the following command line to start the application. The Syncfusion Essential JS 2 menu component will be rendered in the Electron framework.
0 commit comments