Loading Electron Modules in Angular 2 TypeScript Application
<p>My goal is to take <a href="https://angular.io/docs/ts/latest/quickstart.html" rel="nofollow noreferrer">Angular 2's 5 Minute Quickstart</a> and turn it into an Electron app. Which I can do by adding "electron-prebuilt".</p>

<p><a href="https://i.stack.imgur.com/wLfJy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wLfJy.png" alt="angular running"></a></p>

<p>What I <em>can't do</em> is utilize any of Electron's extended captabilites - for example writing to the file system.</p>

<p>I can build and run <a href="https://github.com/onehungrymind/electrogram" rel="nofollow noreferrer">"Electrogram"</a>, but when I try to utilize some of the basic functionality contained within it I get an error in the console of my Electron application:</p>

<h2>Altered app.component.ts</h2>

<pre class="lang-js prettyprint-override"><code>import { Component } from '@angular/core';
import { remote, ipcRenderer } from 'electron';
import { writeFile } from 'fs';

@Component({
  selector: 'my-app',
  template: '&lt;h1&gt;My First Angular 2 App&lt;/h1&gt;&lt;button (click)="doSomething()"&gt;Do Something&lt;/button&gt;'
})
export class AppComponent {

  doSomething() {
    writeFile("c:\temp\doSomething.txt", "some data");
  }
}
</code></pre>

<h2>Error in DevTools Console</h2>

<p><a href="https://i.stack.imgur.com/iAbsI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iAbsI.png" alt="App not working"></a></p>

<p>How can I configure the app to look for the Electron modules in their correct locations?</p>