import { NgModule } from '@angular/core'; import { CommonModule, } from '@angular/common'; import { BrowserModule } from '@angular/platform-browser'; import { Routes, RouterModule } from '@angular/router'; import { DashboardComponent } from './layout/dashboard/dashboard.component'; import { ExitComponent } from './exit/exit.component' import { ProtcolsComponent } from './layout/protcols/protcols.component' const routes: Routes =[ { path: '', redirectTo: 'dashboard', pathMatch: 'full', }, { path: '', component: DashboardComponent, children: [ { path: 'dashboard', component: ProtcolsComponent }, { path: 'exit', component: ExitComponent } ] }, ]; @NgModule({ imports: [ CommonModule, BrowserModule, RouterModule.forRoot(routes) ], exports: [ RouterModule ], }) export class AppRoutingModule { }