I want to convert an Angular JavaScript app into a native Windows application but I don't know how to do it. I heard that electron could be used for this but I don't know how to use electron.
-
1You cannot package JS into an exe file with plain JS. Guess there is no way around it: get familiar with electron. There are tutorials out there that should help you to get started.newBee– newBee2017-01-29 19:57:12 +00:00Commented Jan 29, 2017 at 19:57
-
You might want to take a look at ElectronBaruch– Baruch2017-01-29 20:03:38 +00:00Commented Jan 29, 2017 at 20:03
-
Try Cordova Framework.Harish Kommuri– Harish Kommuri2017-01-30 01:53:41 +00:00Commented Jan 30, 2017 at 1:53
2 Answers
Despite electron there is another solution called nativefier. It is actually quite simple and you don't have to learn a new framework like electron.
Comments
As the comments pointed out already, this is not possible.
Why?
JavaScript can't run directly on the machine, neither do HTML and CSS. You need a browser that can understand those languages and turn them into commands your computer can understand. So your only way to run an Angular App without using chrome or Firefox or whatever browser, is Electron. It's basically a chrome browser plus your custom Angular app packed into an exe. So under the hood, it really just runs your code in a browser environment, but you have more control over it and no address bar etc.