我正在尝试将用 AngularJS1 编写的组件升级到 Angular6。在我的示例中,我正在通过扩展放置在文件夹“ directive-wrappers ”下的“ UpgradeComponent ”来为所有现有的 AngularJS1 组件提供包装器。当我尝试添加一些没有任何指令的控制器时,我收到错误消息
Error: [$injector:unpr] Unknown provider: testDirective2DirectiveProvider <- testDirective2Directive
https://errors.angularjs.org/1.7.8/$injector/unpr?p0=testDirective2DirectiveProvider%20%3C-%20testDirective2Directive
at eval (angular.js:138)
at eval (angular.js:4924)
at Object.getService [as get] (angular.js:5084)
at eval (angular.js:4929)
at Object.getService [as get] (angular.js:5084)
at Function.UpgradeHelper.getDirective (upgrade_helper.ts:56)
at new UpgradeHelper (upgrade_helper.ts:52)
at TestDirective2Wrapper.UpgradeComponent (upgrade_component.ts:106)
at new TestDirective2Wrapper (TestDirective2Wrapper.ts:27)
at createClass (provider.ts:265) "<app-root _nghost-c69="">"
我尝试添加 studentController 和 homePageController,但无法加载它。任何想法为什么我会面临这个问题? https://stackblitz.com/edit/ng6hybrid-c8h6uv