Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fenster überall: Desktopanwendungen mit Angular...

Fenster überall: Desktopanwendungen mit Angular und Electron

Slides for my talk about Angular and Electron at the BASTA! in Mainz

Fabian Gosebrink

September 28, 2017
Tweet

More Decks by Fabian Gosebrink

Other Decks in Technology

Transcript

  1. "Electron is a tool for building Cross- Platform Desktop Apps

    with Javascript, Html and CSS" Anybody I don’t know when
  2. index.js const { app, BrowserWindow } = require('electron'); let mainWindow

    = null; app.on('ready', () => { mainWindow = new BrowserWindow({ width: 1024, height: 768 }); mainWindow.loadURL('file://' + __dirname + '/index.html'); });
  3. IPC

  4. index.js let startSendCpuValues = () => { setInterval(() => {

    cpuValues.getCPUUsage((percentage) => { if (mainWindow) { mainWindow.webContents .send('newCpuValue', (percentage * 100).toFixed(2)); } }); }, 1000); }