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
Voila! You can use your Angular + Electron app in a local development environment with hot reload!
60
+
Voila! You can use your Angular + Electron app in a local development environment with hot reload!
61
61
62
62
The application code is managed by `main.ts`. In this sample, the app runs with a simple Angular App (http://localhost:4200) and an Electron window.
63
63
The Angular component contains an example of Electron and NodeJS native lib import.
64
64
You can disable "Developer Tools" by commenting `win.webContents.openDevTools();` in `main.ts`.
65
65
66
66
## Use Electron / NodeJS / 3rd party libraries
67
67
68
-
As see in previous chapter, this sample project runs on both mode (web and electron). To make this happens, **you have to import your dependencies the right way**. Please check `providers/electron.service.ts` to watch how conditional import of libraries has to be done when using electron / NodeJS / 3rd party librairies in renderer context (ie. Angular).
68
+
This sample project runs in both modes (web and electron). To make this work, **you have to import your dependencies the right way**. Please check `providers/electron.service.ts` to watch how conditional import of libraries has to be done when using electron / NodeJS / 3rd party libraries in renderer context (i.e. Angular).
69
69
70
70
## Browser mode
71
71
72
-
Maybe you only want to execute the application in the browser with hot reload? Just run `npm run ng:serve:web`.
72
+
Maybe you only want to execute the application in the browser with hot reload? Just run `npm run ng:serve:web`.
73
73
74
74
## Included Commands
75
75
@@ -85,7 +85,7 @@ Maybe you only want to execute the application in the browser with hot reload ?
85
85
86
86
## You want to use a specific lib (like rxjs) in electron main thread ?
87
87
88
-
YES! You can do it! Just by importing your library in npm dependencies section (not **devDependencies**) with `npm install --save`. It will be loaded by electron during build phase and added to your final package. Then use your library by importing it in `main.ts` file. Quite simple, isn't it?
88
+
YES! You can do it! Just by importing your library in npm dependencies section (not **devDependencies**) with `npm install --save`. It will be loaded by electron during build phase and added to your final package. Then use your library by importing it in `main.ts` file. Quite simple, isn't it?
0 commit comments