parent
d540f06efc
commit
a780a0b515
@ -0,0 +1,32 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
import { AboutComponent } from './about.component';
|
||||||
|
import { EarlyLifeComponent } from '../early-life/early-life.component';
|
||||||
|
import { CareerComponent } from '../career/career.component';
|
||||||
|
|
||||||
|
const aboutRoutes: Routes = [
|
||||||
|
{
|
||||||
|
path: 'about', //note the path for the main section
|
||||||
|
component: AboutComponent,
|
||||||
|
children: [ //create the sub sections (children) for this route
|
||||||
|
{
|
||||||
|
path: 'early-life',
|
||||||
|
component: EarlyLifeComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'career',
|
||||||
|
component: CareerComponent
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
RouterModule.forChild(aboutRoutes)
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
RouterModule
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class AboutRoutingModule { }
|
||||||
Loading…
Reference in new issue