我用路由使一个模块成为org.module,但是我想为org.module制作子模块,但是所有路由都交给了org.routing.module。
当我在org.routing.module中编写路由时,我在那3个组件中为org.module制作了一个子模块,在这3个组件中所有3个组件均正常工作,但是在一个组件中我想转到另一个组件,路由却不可行工作,没有显示任何错误。
org.module
@NgModule({ 声明:[OrganizationComponent,AddOrgComponent,EmpListComponent,CreateEmpComponent,EmpDetailsComponent,ArchiveEmpComponent,ExcelComponent,DefaultComponent], 进口:[ 通用模块 运输模块 组织路由模块 ] })
org.routing.module
const orgRoutes:路由= [ { 路径:“组织”,组件:OrganizationComponent }
{ 路径:“驱动程序”, 组件:DriversComponent }, { 路径:“供应商”, 组件:VendorsComponent }, { 路径:“车辆”, 组件:VehiclesComponent }, { 路径:“ addvendor”, 组件:AddvendorComponent }
];
vendors.html
添加供应商
浏览器上没有显示错误消息enter code here