Title: Error encountered resolving symbol values statically · Issue #12860 · angular/angular · GitHub
Open Graph Title: Error encountered resolving symbol values statically · Issue #12860 · angular/angular
X Title: Error encountered resolving symbol values statically · Issue #12860 · angular/angular
Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request Current behavior When compiling a hybrid Angular1/2 application created with @upgrade/upgrade/static, using @types/angular+@types/angular-ro...
Open Graph Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request Current behavior When compiling a hybrid Angular1/2 application created with @upgrade/upgrade/static...
X Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request Current behavior When compiling a hybrid Angular1/2 application created with @upgrade/...
Opengraph URL: https://github.com/angular/angular/issues/12860
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error encountered resolving symbol values statically","articleBody":"**I'm submitting a ...** (check one with \"x\")\r\n```\r\n[x] bug report\r\n[ ] feature request\r\n[ ] support request\r\n```\r\n\r\n**Current behavior**\r\nWhen compiling a hybrid Angular1/2 application created with `@upgrade/upgrade/static`, using `@types/angular`+`@types/angular-router` and trying to to use a Angular 1 type annotation on a component constructor:\r\n```\r\n@Component({\r\n // ...\r\n})\r\nexport class PhoneDetailComponent {\r\n // ...\r\n constructor(@Inject('$routeParams')\r\n $routeParams: angular.route.IRouteParamsService,\r\n phone: Phone) {\r\n// ...\r\n```\r\nThis error is displayed:\r\n```\r\nFailed on type {\"filePath\":\"D:/work/angular.io/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-detail/phone-detail.component.ts\",\"name\":\"PhoneDetailComponent\"} with error Error: Error encountered resolving symbol values statically. Expression form not supported (position 27:31 in the original .ts file), resolving symbol PhoneDetailComponent in D:/work/angular.io/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-detail/phone-detail.component.ts\r\nError: Error encountered resolving symbol values statically. Expression form not supported (position 27:31 in the original .ts file), resolving symbol PhoneDetailComponent in D:/work/angular.io/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-detail/phone-detail.component.ts\r\n at simplifyInContext (D:\\work\\angular.io\\public\\docs\\_examples\\node_modules\\@angular\\compiler-cli\\src\\static_reflector.js:470:23)\r\n at StaticReflector.simplify (D:\\work\\angular.io\\public\\docs\\_examples\\node_modules\\@angular\\compiler-cli\\src\\static_reflector.js:473:22)\r\n at StaticReflector.parameters (D:\\work\\angular.io\\public\\docs\\_examples\\node_modules\\@angular\\compiler-cli\\src\\static_reflector.js:101:47)\r\n at CompileMetadataResolver.getDependenciesMetadata (D:\\work\\angular.io\\public\\docs\\_examples\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:14671:56)\r\n at CompileMetadataResolver.getTypeMetadata (D:\\work\\angular.io\\public\\docs\\_examples\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:14636:28)\r\n at CompileMetadataResolver.getDirectiveMetadata (D:\\work\\angular.io\\public\\docs\\_examples\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:14411:30)\r\n at D:\\work\\angular.io\\public\\docs\\_examples\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:13422:44\r\n at Array.forEach (native)\r\n at _extractModulesAndPipesOrDirectives (D:\\work\\angular.io\\public\\docs\\_examples\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:13420:28)\r\n at analyzeNgModules (D:\\work\\angular.io\\public\\docs\\_examples\\node_modules\\@angular\\compiler\\bundles\\compiler.umd.js:13176:16)\r\nCompilation failed\r\n```\r\nWhere line 27, col 31 is as shown:\r\n\r\n\r\n\r\n**Expected behavior**\r\nNo error present.\r\n\r\n**Minimal reproduction of the problem with instructions**\r\nInstall `@types/angular @types/angular-router`, and annotate an injectable with `angular.route.IRouteParamsService`.\r\n\r\n**Please tell us about your environment:**\r\nWindows 10, VS Code, NPM, ngc\r\n\u003c!-- Operating system, IDE, package manager, HTTP server, ... -->\r\n\r\n* **Angular version:** 2.0.X\r\n2.2.0-rc.0\r\n\u003c!-- Check whether this is still an issue in the most recent Angular version -->\r\n\r\n* **Browser:** Chrome 54\r\n\u003c!-- All browsers where this could be reproduced -->\r\n \r\n* **Language:** TypeScript 2.0.3\r\n\r\n* **Node (for AoT issues):** `node --version` = v6.5.0\r\n\r\n/cc @tbosch @petebacondarwin \r\n","author":{"url":"https://github.com/filipesilva","@type":"Person","name":"filipesilva"},"datePublished":"2016-11-14T12:19:03Z","url":"https://github.com/angular/angular/issues/12860"}
| 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:08d659a0-b29b-e594-8bd5-87e5388e3ae6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BD3A:EA06E:8EC3ED:B975AA:6B00DAFA |
| html-safe-nonce | 92fc14fdec7fa8f835f4448376c50986038d3390627042e8fb2187c549b88527 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDNBOkVBMDZFOjhFQzNFRDpCOTc1QUE6NkIwMERBRkEiLCJ2aXNpdG9yX2lkIjoiMzYzMjY4MzI3MTAwOTYzNTc5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1c8c00873d7cc880e540c977160be57a790e5be33fdbebf12f44d5b23283ed73 |
| hovercard-subject-tag | issue:189098743 |
| 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/12860/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7480832823587043eafc47e181e24144d52b5d8130dc3d1f4362e50e666edcf5/angular/angular/issues/12860 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7480832823587043eafc47e181e24144d52b5d8130dc3d1f4362e50e666edcf5/angular/angular/issues/12860 |
| og:image:alt | I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request Current behavior When compiling a hybrid Angular1/2 application created with @upgrade/upgrade/static... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | filipesilva |
| hostname | github.com |
| expected-hostname | github.com |
| None | a481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b |
| 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 | 84c8c5cc25e2fb7f2308428458538436baecc6d2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width