Angular6 routing configuration issues.

in the project, you need to do a navigation bar on the left and display the interface of the component content on the right. It is required to enter the index interface after landing. The index interface is divided into two parts: the left side is the navigation bar and the right side is the content display (showing the contents of dashboard, user and order).
clipboard.png
:

clipboard.png

index interface code:

< div class= "container" >
< div class= "row" >

<div class="col-lg-2 my-3">
  <div class="nav d-flex flex-lg-column flex-row">
    <a class="nav-link active p-1" routerLink="/manage/dashboard" routerLinkActive="/manage/dashboard">
      <i class="fe fe-grid mx-1"></i>
      <span class="mt-1"></span>
    </a>
    <a class="nav-link p-1" routerLink="/manage/user">
      <i class="fe fe-user mx-1"></i>
      <span class="mt-1"></span>
    </a>
    <a class="nav-link p-1" routerLink="/manage/order">
      <i class="fa fa-shopping-cart mr-1"></i>
      <span class="mt-1"></span>
    </a>
  </div>
</div>
<div class="col my-3">
  <div class="d-flex justify-content-between">
    <h2 class="display-4 title-2 text-center mb-6">
      <span></span>: 1
      <span>YUAN</span>
    </h2>
    <p class="small">

</div> <router-outlet></router-outlet> </div>

< / div >
< / div >
my own routing configuration (incorrect, please point out):
app-routing:
const routes: Routes = [
{path: "login", component: LoginComponent},
{path:" index", component: IndexComponent},
{path:", component: IndexComponent, pathMatch: "full", canActivate: [AuthGuardService]},
{path:" * *", redirectTo:"/ index"}
];

core-routing:
const routes: Routes = [
{path: "index", component: IndexComponent}
];

manage-routing:
const routes: Routes = [
{

path: "manage",
children: [
  {path: "dashboard", component: DashboardComponent},
  {path: "user", component: ManageUserComponent},
  {path: "order", component: ManageOrderComponent},
  {path: "", redirectTo: "/dashboard", pathMatch: "prefix"}
]

},
{path:"", redirectTo:"/ manage", pathMatch: "prefix"}];

Jul.23,2021

create two template components in advance, one is the layout of the login interface, the other is the layout of the content, and the structure is different, so it's best to separate.
such as: layout- > full + main (FullComponent,MainComponent)
full can be an empty page, full screen.
main can be typeset left and right, content structure.
then put " < router-outlet > < / router-outlet > " output
similar in the final route

in the corresponding design.
RouterModule.forRoot([
        {
            path: '',
            component: FullComponent,
            children: [
                {path: '', redirectTo: 'login', pathMatch: 'full'},
                {path: 'login', component: LoginComponent}
            ]
        },
        {
            path: 'admin',
            component: MainComponent,
            canActivate: [AuthGuardService],
            children: [
                {path: '', redirectTo: 'index', pathMatch: 'full'},
            ]
        },
        {path: '**', component: NotFoundComponent}
    ])

since the router-outlet exit is written under index, the route should also be configured in children under index

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8fdc-47cde.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8fdc-47cde.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?