小编Mat*_*van的帖子

从 AngularJS 迁移到 Angular 时出错:此构造函数与 Angular 依赖注入不兼容

几天来我一直在尝试理解为什么我的浏览器控制台上出现此错误,完整堆栈:

\n
Unhandled Promise rejection: NG0202: This constructor is not compatible with Angular Dependency Injection because its dependency at index 0 of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index 0 is correct and 2) the correct Angular decorators are defined for this class and its ancestors. ; Zone: …
Run Code Online (Sandbox Code Playgroud)

angularjs typescript systemjs angular import-maps

7
推荐指数
1
解决办法
861
查看次数

标签 统计

angular ×1

angularjs ×1

import-maps ×1

systemjs ×1

typescript ×1