企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
>Parent child routing such as side menu project,technological process is here ,so see it >first of all, we need load the root-router ~~~ const routes: Routes = [ {path:"", redirectTo:'/home',pathMatch:"full"}, {path:'mode1',component:Mode1Component,children:[ {path:"home1", component:Home1Component} ]}, ] ~~~ >we see it , here are first layer routing, it can load component or not , in the matter of fact ,I suppose you'd better load component as left side menu. >Secondly, We need mount child router table, edit the mode1.component.html ~~~ <p>mode1 works!</p> <div style="left: 0;width: 30%;float: left;background-color: cadetblue"> <ul> <li> <a [routerLink]='["home1"]'>点击去home1</a> </li> </ul> </div> <div style="background-color: bisque;float: left;width: 70%"> <p>子路由</p> <router-outlet></router-outlet> </div> ~~~ ![](https://img.kancloud.cn/f5/cc/f5cc12a34facea242fd1a1c94e5b1999_734x545.png)