Fenster überall: Desktopanwendungen mit Angular und Electron

Fenster überall: Desktopanwendungen mit Angular und Electron

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

Fb89953d3a1b1fcb862a186585c37c25?s=128

Fabian Gosebrink

September 28, 2017
Tweet

Transcript

  1. 5.
  2. 8.
  3. 10.
  4. 11.
  5. 12.
  6. 13.

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

    with Javascript, Html and CSS" Anybody I don’t know when
  7. 15.
  8. 16.
  9. 17.
  10. 18.
  11. 19.
  12. 20.
  13. 22.
  14. 23.
  15. 28.
  16. 29.

    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'); });
  17. 31.
  18. 33.
  19. 35.

    IPC

  20. 37.
  21. 40.
  22. 41.
  23. 42.
  24. 43.
  25. 44.
  26. 45.
  27. 46.
  28. 47.
  29. 48.
  30. 49.

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

    cpuValues.getCPUUsage((percentage) => { if (mainWindow) { mainWindow.webContents .send('newCpuValue', (percentage * 100).toFixed(2)); } }); }, 1000); }
  31. 54.
  32. 55.
  33. 56.
  34. 57.
  35. 58.
  36. 59.
  37. 61.
  38. 62.
  39. 66.
  40. 69.