2

我使用标准 tsc (v1.8.10) 编译和 Rollup.js (v0.34.3) 捆绑 Angular 2 应用程序,但执行时出现以下错误:

Uncaught TypeError: Class constructor InjectMetadata cannot be invoked without 'new'(…)

堆栈跟踪的其余部分似乎通过依赖注入器:

decoratorInvocations.map.decoratorInvocation    @   app.js:4012
convertTsickleDecoratorIntoMetadata @   app.js:4007
ctorParameters.map  @   app.js:3911
parameters  @   app.js:3911
parameters  @   app.js:4092
_dependenciesFor    @   app.js:4531
resolveReflectiveFactory    @   app.js:4430
resolveReflectiveProvider   @   app.js:4453
resolveReflectiveProviders  @   app.js:4460
resolve @   app.js:4930
resolveAndCreate    @   app.js:4959
bootstrap   @   app.js:31991
(anonymous function)    @   app.js:32032 <= call to bootstrap
(anonymous function)    @   app.js:32036 <= iife invocation

具体来说,我对 Angular2 还是很陌生。

4

0 回答 0