title: How to integrate Electron ipcRenderer into Angular 2 app based on TypeScript?
body: <p>I want to use <a href="https://github.com/atom/electron/blob/master/docs/api/ipc-main.md">ipcMain</a> / <a href="https://github.com/atom/electron/blob/master/docs/api/ipc-renderer.md">ipcRenderer</a> on my project to communicate from Angular to Electron and back.</p>
  
  <p>The Electron side is pretty clear:</p>
  
  <pre><code>const
    electron = require('electron'),
    ipcMain = electron.ipcMain,
  ;
  
  ipcMain.on('asynchronous-message', function(event, arg) {
    console.debug('ipc.async', arg);
    event.sender.send('asynchronous-reply', 'async-pong');
  });
  
  ipcMain.on('synchronous-message', function(event, arg) {
    console.debug('ipc.sync', arg);
    event.returnValue = 'sync-pong';
  });
  </code></pre>
  
  <p>But I have no idea how to integrate that Electron module into my Angular 2 app. I use <a href="https://github.com/systemjs/systemjs">SystemJS</a> as module loader, but I'm a rookie with it.</p>
  
  <p>Any help appreciated. Thanks.</p>
  
  <p>--- Mario</p>