title: Error: (SystemJS) Can't resolve all parameters for $WebSocket: ([object Object], [object Object], ?)
body: <p>The following code gives </p>
  
  <pre><code>Error: (SystemJS) Can't resolve all parameters for $WebSocket: ([object Object], [object Object], ?).
  </code></pre>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>import { Component } from '@angular/core';
  import {$WebSocket} from 'angular2-websocket/angular2-websocket'
  import {OnInit} from '@angular/core';
  import {Inject} from '@angular/core';
  
  @Component({
    selector: 'my-app',
    templateUrl: `app/root-template.html`,
    providers: [$WebSocket]
  })
  export class AppComponent implements OnInit{       
    constructor(private websocket:$WebSocket) {
  
    }
  
      ngOnInit(): void {
  
      console.log('init')
    }
  
  }
  </code></pre>
  
  <p><strong>And the angular2-websocket code can be seen here: <a href="https://github.com/afrad/angular2-websocket/blob/master/src/angular2-websocket.ts" rel="nofollow noreferrer">https://github.com/afrad/angular2-websocket/blob/master/src/angular2-websocket.ts</a></strong></p>
  
  <p>I've looked into <a href="https://stackoverflow.com/questions/36363279/angular-2-di-not-working-cannot-resolve-all-parameters-for">Angular 2 Di not working - cannot resolve all parameters for</a> and <a href="https://stackoverflow.com/questions/38201916/angular-2-rc-4-systemjs-cant-resolve-all-parameters-for-object-location">Angular 2 RC 4 &quot;(SystemJS) Can&#39;t resolve all parameters for [object Location]: &quot; in IE 11</a> but they don't seem to be the same problem as mine. </p>
  
  <p>I can see that there's a problem with the parameters for the Websocket. It's not possible to call parameters in the constructor's parenthesis, and even if I take it off and leave only <code>providers: [$WebSocket]</code> I still get the error. If I leave only </p>
  
  <pre><code>import {$WebSocket} from 'angular2-websocket/angular2-websocket'
  </code></pre>
  
  <p>there's no error</p>
  
  <p>What exactly are those paremeters that SystemJS is trying to resolve?</p>
  
  <p>My emitDecorator is true even though I don't know what this is for.</p>