<p dir="auto">When using ngHttp.HTTP_BINDINGS in angular's 2.0.0_alpha.35 sfx.dev build it's throwing the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="InvalidBindingError {message: &quot;Invalid binding - only instances of Binding and Type are allowed, got: [object Object]&quot;, _originalException: undefined, _originalStack: undefined, _context: undefined, stack: &quot;Error↵    at InvalidBindingError.BaseException (ht….org/2.0.0-alpha.35/angular2.sfx.dev.js:20107:38)&quot;}

Error
    at InvalidBindingError.BaseException (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:11539:25)
    at new InvalidBindingError (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:12886:65)
    at _resolveBindings (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:32901:15)
    at _resolveBindings (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:32897:20)
    at Function.System.register.execute.Injector.resolve (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:33554:36)
    at Injector.System.register.execute.Injector.resolveAndCreateChild (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:33325:45)
    at _createAppInjector (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:36509:26)
    at https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:36475:27
    at Zone.run (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:136:17)
    at Zone.System.register.execute.NgZone._createInnerZone.zone.fork.fork.$run [as run] (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:20107:38)"><pre class="notranslate"><code class="notranslate">InvalidBindingError {message: "Invalid binding - only instances of Binding and Type are allowed, got: [object Object]", _originalException: undefined, _originalStack: undefined, _context: undefined, stack: "Error↵    at InvalidBindingError.BaseException (ht….org/2.0.0-alpha.35/angular2.sfx.dev.js:20107:38)"}

Error
    at InvalidBindingError.BaseException (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:11539:25)
    at new InvalidBindingError (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:12886:65)
    at _resolveBindings (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:32901:15)
    at _resolveBindings (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:32897:20)
    at Function.System.register.execute.Injector.resolve (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:33554:36)
    at Injector.System.register.execute.Injector.resolveAndCreateChild (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:33325:45)
    at _createAppInjector (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:36509:26)
    at https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:36475:27
    at Zone.run (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:136:17)
    at Zone.System.register.execute.NgZone._createInnerZone.zone.fork.fork.$run [as run] (https://code.angularjs.org/2.0.0-alpha.35/angular2.sfx.dev.js:20107:38)
</code></pre></div>
<p dir="auto">Here you have a plunkr to reproduce the issue:<br>
<a href="http://plnkr.co/edit/XIW0EgIZvs3dtNcYN1dJ?p=preview" rel="nofollow">http://plnkr.co/edit/XIW0EgIZvs3dtNcYN1dJ?p=preview</a></p>
<p dir="auto">If you change <code class="notranslate">ngHttp.HTTP_BINDINGS</code> for the following code, then everything works:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[
   ng.bind(ngHttp.ConnectionBackend).toClass(ngHttp.XHRBackend), 
   ngHttp.BrowserXhr, 
   ng.bind(ngHttp.RequestOptions).toClass(ngHttp.BaseRequestOptions),
   ng.bind(ngHttp.ResponseOptions).toClass(ngHttp.BaseResponseOptions),
   ngHttp.Http
]"><pre class="notranslate"><span class="pl-kos">[</span>
   <span class="pl-s1">ng</span><span class="pl-kos">.</span><span class="pl-en">bind</span><span class="pl-kos">(</span><span class="pl-s1">ngHttp</span><span class="pl-kos">.</span><span class="pl-c1">ConnectionBackend</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toClass</span><span class="pl-kos">(</span><span class="pl-s1">ngHttp</span><span class="pl-kos">.</span><span class="pl-c1">XHRBackend</span><span class="pl-kos">)</span><span class="pl-kos">,</span> 
   <span class="pl-s1">ngHttp</span><span class="pl-kos">.</span><span class="pl-c1">BrowserXhr</span><span class="pl-kos">,</span> 
   <span class="pl-s1">ng</span><span class="pl-kos">.</span><span class="pl-en">bind</span><span class="pl-kos">(</span><span class="pl-s1">ngHttp</span><span class="pl-kos">.</span><span class="pl-c1">RequestOptions</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toClass</span><span class="pl-kos">(</span><span class="pl-s1">ngHttp</span><span class="pl-kos">.</span><span class="pl-c1">BaseRequestOptions</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
   <span class="pl-s1">ng</span><span class="pl-kos">.</span><span class="pl-en">bind</span><span class="pl-kos">(</span><span class="pl-s1">ngHttp</span><span class="pl-kos">.</span><span class="pl-c1">ResponseOptions</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toClass</span><span class="pl-kos">(</span><span class="pl-s1">ngHttp</span><span class="pl-kos">.</span><span class="pl-c1">BaseResponseOptions</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
   <span class="pl-s1">ngHttp</span><span class="pl-kos">.</span><span class="pl-c1">Http</span>
<span class="pl-kos">]</span></pre></div>
<p dir="auto">Looks like ngHttp module is using a somehow incompatible binding mechanism to generate HTTP_BINDINGS.</p>
<p dir="auto">If I'm making something wrong any advice is welcome. Also if you think I can give you a hand to resolve this give me some tips and I'll PR with a solution.</p>
<p dir="auto">Thank you!</p>