Repository navigation
Closed
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-router and trying to to use a Angular 1 type annotation on a component constructor:
@Component({
// ...
})
export class PhoneDetailComponent {
// ...
constructor(@Inject('$routeParams')
$routeParams: angular.route.IRouteParamsService,
phone: Phone) {
// ...
This error is displayed:
Failed 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
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
at simplifyInContext (D:\work\angular.io\public\docs\_examples\node_modules\@angular\compiler-cli\src\static_reflector.js:470:23)
at StaticReflector.simplify (D:\work\angular.io\public\docs\_examples\node_modules\@angular\compiler-cli\src\static_reflector.js:473:22)
at StaticReflector.parameters (D:\work\angular.io\public\docs\_examples\node_modules\@angular\compiler-cli\src\static_reflector.js:101:47)
at CompileMetadataResolver.getDependenciesMetadata (D:\work\angular.io\public\docs\_examples\node_modules\@angular\compiler\bundles\compiler.umd.js:14671:56)
at CompileMetadataResolver.getTypeMetadata (D:\work\angular.io\public\docs\_examples\node_modules\@angular\compiler\bundles\compiler.umd.js:14636:28)
at CompileMetadataResolver.getDirectiveMetadata (D:\work\angular.io\public\docs\_examples\node_modules\@angular\compiler\bundles\compiler.umd.js:14411:30)
at D:\work\angular.io\public\docs\_examples\node_modules\@angular\compiler\bundles\compiler.umd.js:13422:44
at Array.forEach (native)
at _extractModulesAndPipesOrDirectives (D:\work\angular.io\public\docs\_examples\node_modules\@angular\compiler\bundles\compiler.umd.js:13420:28)
at analyzeNgModules (D:\work\angular.io\public\docs\_examples\node_modules\@angular\compiler\bundles\compiler.umd.js:13176:16)
Compilation failed
Where line 27, col 31 is as shown:

Expected behavior
No error present.
Minimal reproduction of the problem with instructions
Install @types/angular @types/angular-router, and annotate an injectable with angular.route.IRouteParamsService.
Please tell us about your environment:
Windows 10, VS Code, NPM, ngc
- Angular version: 2.0.X
2.2.0-rc.0
- Browser: Chrome 54
-
Language: TypeScript 2.0.3
-
Node (for AoT issues):
node --version= v6.5.0
Metadata
Metadata
Assignees
Labels
No labels
Activity
DzmitryShylovich commentedon Nov 14, 2016
#12631
filipesilva commentedon Nov 14, 2016
@DzmitryShylovich thank you, this definitely looks like a dupe of that one.
angular-automatic-lock-bot commentedon Sep 10, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.