How to use Phoenix Channels / Sockets in an Angular 2 app?
<p>I have a backend built with Elixir / Phoenix and a frontend built with Angular 2 (Typescript, Brunch,io for building, ES6). I now want to use Phoenix Channels. And I'm a bit desperate trying to use the Phoenix Javascript Client in my frontend.</p>

<p>When I install <a href="https://www.npmjs.com/package/phoenix-js" rel="nofollow">https://www.npmjs.com/package/phoenix-js</a> via <code>npm install phoenix-js</code> and then try to inject it into a service in angular like this:</p>

<pre><code>import { Socket } from "phoenix-js";
</code></pre>

<p>I always get the error <code>Cannot find module phoenix-js</code> during compilation. </p>

<p>I'm a bit stuck and every hint on how to get this to work would be greatly appreciated.</p>

<p>Thanks</p>