title: How to import socket.io-client in a angular 2 application?
body: <p>I want to include sockets.io-client in my angular 2 application. First I installed socket.io-client, installed typings:</p>
  
  <pre><code>npm install socket.io-client --save
  typings install socket.io-client --save --ambient
  </code></pre>
  
  <p>Next step was to include socket.io-client into my index.html:</p>
  
  <pre><code> &lt;script src="node_modules/socket.io-client/socket.io.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>In my component, I am importing sockets.io:</p>
  
  <pre><code>import * as io from 'socket.io-client'
  </code></pre>
  
  <p>And then using it:</p>
  
  <pre><code>var socket = io('http://localhost:3000');
  socket.on('event', function(data:any){
     console.log(data);
  }.bind(this)); 
  </code></pre>
  
  <p>This fails with:</p>
  
  <pre><code>zone.js:101 GET http://localhost:3001/socket.io-client 404 (Not Found)
  (index):18 Error: Error: XHR error (404 Not Found) loading http://localhost:3001/socket.io-client
  </code></pre>
  
  <p>Any ideas?</p>