【发布时间】:2021-07-06 08:29:45
【问题描述】:
我已经实现了ngx-bootstrap-treeview,它作为一个功能运行良好,但是当我执行我的组件测试来验证 UI 时,它开始抛出错误。
我已经在app.module.ts中声明了模块
import { NgxBootstrapTreeviewModule } from 'ngx-bootstrap-treeview';
imports: [..., NgxBootstrapTreeviewModule],
exports: [..., NgxBootstrapTreeviewModule]
如果我在我的测试组件abc.component.steps.ts 中导入相同的模块,那么它会开始抛出新的错误:
【问题讨论】:
-
除了app.module还有其他模块吗?
-
是的。 Shared.module 但它已经在 app.module 中导入,并且我以类似的方式导入了其他模块并且工作正常。我已经导入 RouterTestingModule 然后我开始面临错误
root of undefined
标签: angular routes cucumber karma-jasmine