Beruflich Dokumente
Kultur Dokumente
Instalamos angular-cli
npm install -g @angular/cli
Agregamos los types de electrón para no tener problemas con los typescript
de angular.
npm i -D @types/electron
app.on("ready", createWindow);
app.on("activate", () => {
if (win === null) {
createWindow();
}
});
function createWindow() {
win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: { nodeIntegration: true }
});
win.loadURL(
url.format({
pathname: path.join(__dirname, `/../../dist/angular-
electron/index.html`),
protocol: "file:",
slashes: true
})
);
win.webContents.openDevTools();
win.on("closed", () => {
win = null;
});
}