how to use electron browser window inside components in angular-cli?

匿名 (未验证) 提交于 2019-12-03 09:05:37

问题:

Angular-cli doesn't accept the electron inside components. how to use electron browser window inside components in angular-cli? I got an error fs.existsync like this. Is there any other options to use electron with angular2 components?

var electron = require('electron');

or

   import electron from 'electron';
Both are not working inside ts?

回答1:

You can only do this by initialize electron variables inside index.html and you can communicate wherever you want inside typescript. Use electron variables inside TS.



回答2:

This will help you to communicate with electron in any of the script languages like angular2,react js, node js etc.,



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!