-
Notifications
You must be signed in to change notification settings - Fork 88
ipcRenderer.on issue #2
Comments
instead of using
I would do
I think with your implementation, the callback is not invoked inside of angular, just the submission of the |
Thanks for a quick help. I tried your suggestion still facing the issue, however i also remove this._ngZone.run(()=> from all the places I still not able to execute the calls in angular, however console prints just fine. |
console.log will work fine, because it's not related to angular at all. if you call it like
it should work. But if you want to update bound data in angular templates, you've to ensure |
Hmm OK, do you have some sample code to help me understand this logic better?
|
during the weekendm I'll create a short example using node.js |
no actually I am trying to do a bool visibility of some control hide/unhide in angular component from electron menubar |
ahh i see, so you are using |
👍 correct :) |
@abhargav7 I've updated the example at https://github.com/ThorstenHans/electron-ngx-sample there is a button in the menu which toggles the HTH 🤘 |
closing this one. @abhargav7 If you've further question feel free to open another issue |
I have successfully integrated this package and able to listen to click on menu items in angular2 components. But the issue is I cannot bind the functions properly inside it suppose I try to update some text inside the text box or change the bool value it does not work, however when I do a console.log("function is hit") it appears in electron devtoogle window, but values are not assigned.
this._ngZone.run(() => { _electronService.ipcRenderer.on('open-file', this.enableError.bind(this));
enableError()
{
console.log("function is hit");
this.something= true/false it does not work
}
The text was updated successfully, but these errors were encountered: