Title: The extended strategy could not inject the own provider · Issue #8777 · angular/angular · GitHub
Open Graph Title: The extended strategy could not inject the own provider · Issue #8777 · angular/angular
X Title: The extended strategy could not inject the own provider · Issue #8777 · angular/angular
Description: Hi. http://plnkr.co/edit/kRLoIs92mHihxeKa8ncS?p=preview In 2.0.0-rc.1. Current behavior @Injectable() class MyService { foo(): string { return 'foo'; } } @Injectable() export class MyHashLocationStrategy extends HashLocationStrategy { co...
Open Graph Description: Hi. http://plnkr.co/edit/kRLoIs92mHihxeKa8ncS?p=preview In 2.0.0-rc.1. Current behavior @Injectable() class MyService { foo(): string { return 'foo'; } } @Injectable() export class MyHashLocationSt...
X Description: Hi. http://plnkr.co/edit/kRLoIs92mHihxeKa8ncS?p=preview In 2.0.0-rc.1. Current behavior @Injectable() class MyService { foo(): string { return 'foo'; } } @Injectable() export class MyHashLo...
Opengraph URL: https://github.com/angular/angular/issues/8777
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The extended strategy could not inject the own provider","articleBody":"Hi.\n\nhttp://plnkr.co/edit/kRLoIs92mHihxeKa8ncS?p=preview\n\nIn 2.0.0-rc.1.\n\n**Current behavior**\n\n``` ts\n@Injectable()\nclass MyService {\n foo(): string {\n return 'foo';\n }\n}\n\n@Injectable()\nexport class MyHashLocationStrategy extends HashLocationStrategy {\n\n constructor(private __platformLocation: PlatformLocation,\n MyService: MyService,\n @Optional() @Inject(APP_BASE_HREF) _baseHref: string) {\n super(__platformLocation, _baseHref);\n debugger;\n console.log(MyService.foo());\n }\n}\n\nbootstrap(App, [\n ROUTER_PROVIDERS,\n MyService,\n provide(LocationStrategy, {useClass: MyHashLocationStrategy})\n])\n .catch(err => console.error(err));\n```\n\n```\nTypeError: Cannot read property 'foo' of null\n```\n\n**Expected/desired behavior**\n\nIt should be correctly DI to `MyService` in `class MyHashLocationStrategy extends HashLocationStrategy`.\n\nThanks.\n","author":{"url":"https://github.com/okunokentaro","@type":"Person","name":"okunokentaro"},"datePublished":"2016-05-23T03:55:57Z","url":"https://github.com/angular/angular/issues/8777"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:ad26b3fa-242c-3149-be51-6c1e5acf1a7f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E9D8:19F84C:AED33B:E24179:6B00E5A6 |
| html-safe-nonce | 410710b15543803c2d7d1d021ce4646989ef71727b17207edfc4f1f5c46cfde2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOUQ4OjE5Rjg0QzpBRUQzM0I6RTI0MTc5OjZCMDBFNUE2IiwidmlzaXRvcl9pZCI6Ijc1MzM5MDEyNTQ5NjQwNzc5OTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7007ae7f0499d4b74a2a04723a7a0a56d8e12f1e5c31caf59e68a0e60e7937a4 |
| hovercard-subject-tag | issue:156195712 |
| 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/8777/issue_layout |
| twitter:image | https://opengraph.githubassets.com/92fef728c25488fc6aad3f3663f86fa19248db11fbfece0dd032b937b2fee372/angular/angular/issues/8777 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/92fef728c25488fc6aad3f3663f86fa19248db11fbfece0dd032b937b2fee372/angular/angular/issues/8777 |
| og:image:alt | Hi. http://plnkr.co/edit/kRLoIs92mHihxeKa8ncS?p=preview In 2.0.0-rc.1. Current behavior @Injectable() class MyService { foo(): string { return 'foo'; } } @Injectable() export class MyHashLocationSt... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | okunokentaro |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| 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 | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width