我在AppModule中有RoomsComponent,它的路线是/ rooms。 另外我有一个懒惰加载模块CompaniesModule与组件CompaniesComponent的路线/公司。使用来自Angular 4中另一个模块的组件
我试图在AppModule中重新使用RoomsComponent时,建立像/ companies/{company_id}/rooms /的路线。
我不能做很长时间RoomsComponent没有在CompaniesModule中声明,但是这会引发错误,因为组件不能在多个模块中声明。
查看https://stackoverflow.com/questions/39601784/angular-2-use-component-from-another-module/39601837#39601837 – yurzui