{"action":"closed","issue":{"url":"https://api.github.com/repos/angular/angular/issues/3365","labels_url":"https://api.github.com/repos/angular/angular/issues/3365/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/3365/comments","events_url":"https://api.github.com/repos/angular/angular/issues/3365/events","html_url":"https://github.com/angular/angular/issues/3365","id":98014387,"number":3365,"title":"fix(http): cannot use JSONP_BINDINGS and HTTP_BINDINGS in same injector","user":{"login":"jeffbcross","id":463703,"avatar_url":"https://avatars.githubusercontent.com/u/463703?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffbcross","html_url":"https://github.com/jeffbcross","followers_url":"https://api.github.com/users/jeffbcross/followers","following_url":"https://api.github.com/users/jeffbcross/following{/other_user}","gists_url":"https://api.github.com/users/jeffbcross/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffbcross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffbcross/subscriptions","organizations_url":"https://api.github.com/users/jeffbcross/orgs","repos_url":"https://api.github.com/users/jeffbcross/repos","events_url":"https://api.github.com/users/jeffbcross/events{/privacy}","received_events_url":"https://api.github.com/users/jeffbcross/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/comp:%20data-access","name":"comp: data-access","color":"c7def8"},{"url":"https://api.github.com/repos/angular/angular/labels/effort1:%20easy%20(hour)","name":"effort1: easy (hour)","color":"bfe5bf"},{"url":"https://api.github.com/repos/angular/angular/labels/P2:%20required","name":"P2: required","color":"fad8c7"},{"url":"https://api.github.com/repos/angular/angular/labels/type:%20bug","name":"type: bug","color":"EEEEEE"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-29T19:41:42Z","updated_at":"2015-08-24T06:19:46Z","closed_at":"2015-08-24T06:19:46Z","body":"If I create an injector as follows, Http will use the JsonpBackend instead of XHRBackend.\r\n\r\n```js\r\nvar injector = Injector.resolveAndCreate([HTTP_BINDINGS, JSONP_BINDINGS]);\r\nvar http = injector.get(Http);\r\nhttp.get('foo.json'); // Would use JSONP Backend.\r\n```\r\n\r\nThis is because both injectables bind the abstract `ConnectionBackend` class to their own specific implementation.\r\n\r\nThis should be able to be easily fixed by binding `Jsonp` and `Http` to factories that have dependencies on concrete backends instead of overriding the `ConnectionBackend` bindings.\r\n"}}