Title: ng build --prod breaks -> support interface types in injectable constuctors · Issue #5757 · angular/angular-cli · GitHub
Open Graph Title: ng build --prod breaks -> support interface types in injectable constuctors · Issue #5757 · angular/angular-cli
X Title: ng build --prod breaks -> support interface types in injectable constuctors · Issue #5757 · angular/angular-cli
Description: bug report Versions @angular/cli: 1.0.0 node: 6.10.1 os: win32 x64 @angular/animations: 4.0.1 @angular/common: 4.0.1 @angular/compiler: 4.0.1 @angular/core: 4.0.1 @angular/forms: 4.0.1 @angular/http: 4.0.1 @angular/material: 2.0.0-beta.1...
Open Graph Description: bug report Versions @angular/cli: 1.0.0 node: 6.10.1 os: win32 x64 @angular/animations: 4.0.1 @angular/common: 4.0.1 @angular/compiler: 4.0.1 @angular/core: 4.0.1 @angular/forms: 4.0.1 @angular/htt...
X Description: bug report Versions @angular/cli: 1.0.0 node: 6.10.1 os: win32 x64 @angular/animations: 4.0.1 @angular/common: 4.0.1 @angular/compiler: 4.0.1 @angular/core: 4.0.1 @angular/forms: 4.0.1 @angular/htt...
Opengraph URL: https://github.com/angular/angular-cli/issues/5757
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ng build --prod breaks -> support interface types in injectable constuctors","articleBody":"### bug report\r\n\r\n### Versions\r\n@angular/cli: 1.0.0\r\nnode: 6.10.1\r\nos: win32 x64\r\n@angular/animations: 4.0.1\r\n@angular/common: 4.0.1\r\n@angular/compiler: 4.0.1\r\n@angular/core: 4.0.1\r\n@angular/forms: 4.0.1\r\n@angular/http: 4.0.1\r\n@angular/material: 2.0.0-beta.1\r\n@angular/platform-browser: 4.0.1\r\n@angular/platform-browser-dynamic: 4.0.1\r\n@angular/router: 4.0.1\r\n@angular/cli: 1.0.0\r\n\r\n### Repro steps.\r\n\r\nit's the same bug as in the following link but now happens only on prod mode:\r\nIssue: https://github.com/angular/angular/issues/12631\r\nFix: https://github.com/angular/angular/pull/14894\r\n\r\nI have a constructor that uses @Inject to get a dependency, and references an interface as type, constructor( @Inject(Document) private document: Document). \r\n\r\n### What is the current behavior? (You can also link to an open issue here)\r\nWhen I run ng build --prod, I get this error:\r\n\r\n> \r\nERROR in Error encountered resolving symbol values statically. Could not resolve type Document (position 26:88 in the original .ts file), resolving symbol OptimizationTable in E:/dev/WorkPlace/web/js/src/myApp-fa/src/app/site/modules/+optimization/table/optimizationTable.component.ts\r\n\r\nERROR in ./src/main.ts\r\nModule not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'E:\\dev\\WorkPlace\\web\\js\\src\\myApp\\src'\r\n @ ./src/main.ts 5:0-74\r\n @ multi ./src/main.ts\r\n\r\nwhen changed to:\r\n`constructor( @Inject(Document) private document: any)\r\n`it works\r\n\r\n### What is the new behavior?\r\n\r\n would expect to be able to reference an interface in a constructor in conjunction with @Inject.\r\n\r\n","author":{"url":"https://github.com/MadUser","@type":"Person","name":"MadUser"},"datePublished":"2017-03-30T13:40:40Z","url":"https://github.com/angular/angular-cli/issues/5757"}
| 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:74acf2e7-bd61-1675-881d-eed265783446 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DBA6:172B92:7FCA3C:ACC78B:6B00E044 |
| html-safe-nonce | c7c5a63a1d5375ead93b953933a9d14fe970c51633fb144f6aff71f0a124d324 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkE2OjE3MkI5Mjo3RkNBM0M6QUNDNzhCOjZCMDBFMDQ0IiwidmlzaXRvcl9pZCI6IjExMjEwMzI5NTM3NTQzMzc5NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4b3f3a884dddd703d4a0236a30fa258d72b54e298c269958d806db997fe6f7ae |
| hovercard-subject-tag | issue:218200718 |
| 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-cli/5757/issue_layout |
| twitter:image | https://opengraph.githubassets.com/260b5f43182904e4f209eef95d8c40922138530bbd7fb7d771c8bc73ab3d7764/angular/angular-cli/issues/5757 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/260b5f43182904e4f209eef95d8c40922138530bbd7fb7d771c8bc73ab3d7764/angular/angular-cli/issues/5757 |
| og:image:alt | bug report Versions @angular/cli: 1.0.0 node: 6.10.1 os: win32 x64 @angular/animations: 4.0.1 @angular/common: 4.0.1 @angular/compiler: 4.0.1 @angular/core: 4.0.1 @angular/forms: 4.0.1 @angular/htt... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MadUser |
| hostname | github.com |
| expected-hostname | github.com |
| None | 043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| 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 | 5425dc24e8bd8d6fca9641a12afc984825a43875 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width