【发布时间】:2021-10-18 16:59:21
【问题描述】:
我可以从路由中的另一个模块中导入一个组件,该模块没有被导出。
路由模块
{
path: 'home',
component: DashComponent
}
B路由模块
{
declarations: [DashComponent],
}
从上面的代码中可以看出,DashComponent 没有在 B 路由模块中导出,但我仍然可以在 A 路由模块中使用它而不会出现任何错误。为什么?
【问题讨论】:
标签: angular