角路由模块可以使用不从另一个模块导出的组件

时间:2019-12-26 03:39:59

标签: angular angular-routing angular8 angular-module

为什么Angular路由模块可以直接使用未从另一个模块导出的组件

路由ngModule

...
{
    path: 'home',
    component: bComponent    // it is not exported in B module
}

B ngModule

{
    declarations: [bComponent],
    // not exporting bComponent, but it still can be used in A routing ngModule. Why?
}

0 个答案:

没有答案