路由和导航2 您访问的页面不存在组件 //路径越模糊,定义顺序越靠后,全匹配放在最后 {path:'**', component:PageNotFoundComponent} 定义默认组件 指定组件 {path:'', component:DepartmentListComponent} 2.重定向到指定路径(推荐) {path:'', redirectTo:'/departments', pathMatch:'full'}