Posts

Showing posts with the label electron

Electron and angularJS app architecture - SPA clone in two windows

Image
Clash Royale CLAN TAG #URR8PPP Electron and angularJS app architecture - SPA clone in two windows In mainWindow of my application I have angularJS SPA. Everything is fine untill I create new window. In every window I need to loadURL which is path to HTML document like in mainWindow : mainWindow = new BrowserWindow({ width: 790, height: 580 }); mainWindow.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), // load - index.html angularjs dashboard slashes: true })); Problem is that since I have SPA in my mainWindow after I open new window I should load entire SPA to new window as well as in mainWindow and just redirect to correct (hidden) url so I would have some other content in this new one. I would need to load this entire SPA in order to have access to my SPA services, factories and directives which I need to use in new window. let createQuestionWindow = () => { questionWindow = new BrowserWindow({ width: 380, heigh...

A few questions on using angular in electron / electron forge

A few questions on using angular in electron / electron forge I'm currently testing electron out using the electron forge angular template. I followed the angular tutorial and in the routing section I ran into an issue where the console was giving me this error: "Uncaught TypeError: core.InjectionToken is not a constructor" After many hours of testing I found that the installed @angular/router module by default is 6.x.x while the installed version of @angular/core is 2.4.10 which results in compatability issues. So my questions are the following: I'm sorry if there are obvious answers to my questions. I'm new to this stack and found this very confusing. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.