Title: Better error message when using a service with a generic parameter · Issue #12262 · angular/angular · GitHub
Open Graph Title: Better error message when using a service with a generic parameter · Issue #12262 · angular/angular
X Title: Better error message when using a service with a generic parameter · Issue #12262 · angular/angular
Description: I'm submitting a ... (check one with "x") [ *] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/a...
Open Graph Description: I'm submitting a ... (check one with "x") [ *] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support reques...
X Description: I'm submitting a ... (check one with "x") [ *] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not s...
Opengraph URL: https://github.com/angular/angular/issues/12262
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Better error message when using a service with a generic parameter","articleBody":"\u003c!--\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING\n-->\n\n**I'm submitting a ...** (check one with \"x\")\n\n```\n[ *] bug report => search github for a similar issue or PR before submitting\n[ ] feature request\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\n```\n\n**Current behavior**\n\n\u003c!-- Describe how the bug manifests. -->\n\nWhen compiling a Ionic2 application for AOT, the ngc compiler gives me this error.\n\n`ngc: Error: Error at C:/dev/ecdt-mobile/.tmp/app/app.module.ngfactory.ts:177:20: Generic type 'BaseService\u003cT>' requires 1 type argument(s).` \n\n**Expected behavior**\n\n\u003c!-- Describe what the behavior would be without the bug. -->\n\nIt should compile. I have created an angular2 repro (without ionic) and it compiles fine. HOWEVER the generated code is underline in my IDE and I believe this is not right:\n\n```\n __BaseService_76:import46.BaseService;\n```\n\nit should be something like:\n`__BaseService_76:import46.BaseService\u003cany>;`\n\n**Minimal reproduction of the problem with instructions**\n\n\u003c!--\nIf the current behavior is a bug or you can illustrate your feature request better with an example, \nplease provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via\nhttps://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).\n-->\n\nThe repro project is here: https://github.com/graphicsxp/angular2\n\n**What is the motivation / use case for changing the behavior?**\n\n\u003c!-- Describe the motivation or the concrete use case -->\n\n**Please tell us about your environment:**\n\n\u003c!-- Operating system, IDE, package manager, HTTP server, ... -->\n\nWindows, npm\n- **Angular version:** 2.0.X\n \u003c!-- Check whether this is still an issue in the most recent Angular version -->\n 2.0 \n- **Browser:** [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]\n \u003c!-- All browsers where this could be reproduced -->\n chrome\n- **Language:** [all | TypeScript X.X | ES6/7 | ES5]\n typescript 2.0\n- **Node (for AoT issues):** `node --version` = \n v4.5.0\n","author":{"url":"https://github.com/graphicsxp","@type":"Person","name":"graphicsxp"},"datePublished":"2016-10-13T07:27:04Z","url":"https://github.com/angular/angular/issues/12262"}
| 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:8277141c-cd3f-7da3-1ca7-3b1f201761c0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B51C:1DB641:A9B6DD:DC32B8:6B00E4CF |
| html-safe-nonce | f987b1d66d106b8bade2cf6e34eeb7e47b382ccf9264d7e39692af8bcb39308f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTFDOjFEQjY0MTpBOUI2REQ6REMzMkI4OjZCMDBFNENGIiwidmlzaXRvcl9pZCI6IjkwNzY2ODk2NDk4MzcwNzM2MTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9bfe99687f6589f344dea0adda1ddd11a8f304250aaf6eab089ebcd7b9f95a72 |
| hovercard-subject-tag | issue:182715065 |
| 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/12262/issue_layout |
| twitter:image | https://opengraph.githubassets.com/859afc03931cd3e63e2dfa91eabc145796b4ab936950da372325c9c7fd023ca4/angular/angular/issues/12262 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/859afc03931cd3e63e2dfa91eabc145796b4ab936950da372325c9c7fd023ca4/angular/angular/issues/12262 |
| og:image:alt | I'm submitting a ... (check one with "x") [ *] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support reques... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | graphicsxp |
| 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