Title: Http Requests and Http Injectables · Issue #3086 · angular/angular · GitHub
Open Graph Title: Http Requests and Http Injectables · Issue #3086 · angular/angular
X Title: Http Requests and Http Injectables · Issue #3086 · angular/angular
Description: Hi all ! I think httpInjectables are not working completely... Problem 1 This is my Service: @Component({ viewInjector: [httpInjectables] }) export class Service { constructor(http : Http) { ObservableWrapper.subscribe(http.get('http://a...
Open Graph Description: Hi all ! I think httpInjectables are not working completely... Problem 1 This is my Service: @Component({ viewInjector: [httpInjectables] }) export class Service { constructor(http : Http) { Observ...
X Description: Hi all ! I think httpInjectables are not working completely... Problem 1 This is my Service: @Component({ viewInjector: [httpInjectables] }) export class Service { constructor(http : Http) { Observ...
Opengraph URL: https://github.com/angular/angular/issues/3086
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Http Requests and Http Injectables","articleBody":"Hi all !\n\nI think httpInjectables are not working completely...\n\n---\n\n\u003ch1\u003eProblem 1\u003c/h1\u003e\n\nThis is my Service:\n\n``` javascript\n@Component({\n viewInjector: [httpInjectables]\n})\nexport class Service {\n constructor(http : Http) {\n ObservableWrapper.subscribe(http.get('http://api.github.com/users'), res =\u003e { \n debugger\n this.people = res.json()\n });\n }\n}\n```\n\nWhich throws this:\n\n\nThis is my bootstrap:\n\n``` javascript\nbootstrap(Application, []);\n```\n\n---\n\nBut \u003cb\u003eonly\u003c/b\u003e if I change my bootstrap, I can run the code..\n\n``` javascript\nbootstrap(Application, [httpInjectables]);\n```\n\nAny ideas why is this happening?\nI mean, if I want my service component to be distributed to other applications, I need to add httpInjectables to bootstrap? Seems wrong... The idea of NG2 was to build scalable and independent components.\n\n---\n\n\u003ch1\u003eProblem 2\u003c/h1\u003e\n\nIf I request a non existing resource (it also happens locally): \n\n\nThe status body id correct, but the status code is not and always returns 200.\n\nBest regards,\nTiago Braga\n","author":{"url":"https://github.com/tbragaf","@type":"Person","name":"tbragaf"},"datePublished":"2015-07-16T15:43:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/3086/angular/issues/3086"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1d539215-769d-81fc-fbee-9ba253412a5b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B70:12CFC4:1F42824:2D30CB9:6A60AD64 |
| html-safe-nonce | ebeb90f74eb1f2b388c13a200577c4d94f92c5ac0751e1bfc1f0a9bc9cff0646 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjcwOjEyQ0ZDNDoxRjQyODI0OjJEMzBDQjk6NkE2MEFENjQiLCJ2aXNpdG9yX2lkIjoiNTQwNjkzMTU5NDgyNDk1MzE4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fb89c8227ba1e9743afa8e953901eefdfd75b432aecd3652c462f852ce15ddc4 |
| hovercard-subject-tag | issue:95463219 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/3086/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e7812b43dcad2b7b5629c6973e1962976fb7843b1c9d0a4bb15e3fdcdf68aec1/angular/angular/issues/3086 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e7812b43dcad2b7b5629c6973e1962976fb7843b1c9d0a4bb15e3fdcdf68aec1/angular/angular/issues/3086 |
| og:image:alt | Hi all ! I think httpInjectables are not working completely... Problem 1 This is my Service: @Component({ viewInjector: [httpInjectables] }) export class Service { constructor(http : Http) { Observ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tbragaf |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66af895cfa11168648b21cb54f2bdc3b0587503cc95c3040344b93f2cd4f9e08 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b2efb079bef4751afb19e51eb8a7bfb7a46dd1a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width