diff --git a/src/app/about/about-routing.module.ts b/src/app/about/about-routing.module.ts new file mode 100644 index 0000000..aeb8e4a --- /dev/null +++ b/src/app/about/about-routing.module.ts @@ -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.component'; +import { CareerComponent } from './career.component'; + +const aboutRoutes: Routes = [ + { + path: 'about', + component: AboutComponent, + children: [ + { + path: 'early-life', + component: EarlyLifeComponent + }, + { + path: 'career', + component: CareerComponent + } + ] + } +]; + +@NgModule({ + imports: [ + RouterModule.forChild(aboutRoutes) + ], + exports: [ + RouterModule + ] +}) +export class AboutRoutingModule { } diff --git a/src/app/about/about.component.html b/src/app/about/about.component.html index 83de16f..812cb9a 100644 --- a/src/app/about/about.component.html +++ b/src/app/about/about.component.html @@ -1 +1,12 @@

About Page

+ + diff --git a/src/app/about/career.component.ts b/src/app/about/career.component.ts new file mode 100644 index 0000000..3bc9fed --- /dev/null +++ b/src/app/about/career.component.ts @@ -0,0 +1,6 @@ +import { Component } from '@angular/core'; + +@Component({ + template: `

a summary of my career goes here

` +}) +export class CareerComponent { } diff --git a/src/app/about/early-life.component.ts b/src/app/about/early-life.component.ts new file mode 100644 index 0000000..ba70c32 --- /dev/null +++ b/src/app/about/early-life.component.ts @@ -0,0 +1,6 @@ +import { Component } from '@angular/core'; + +@Component({ + template: `

this is a description about my early life

` +}) +export class EarlyLifeComponent { } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index b6e8060..d3051d1 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -7,10 +7,6 @@ import { ResumeComponent } from './resume/resume.component'; import { UserComponent } from './user/user.component'; const routes: Routes = [ - { - path: 'about', - component: AboutComponent - }, { path: 'resume', component: ResumeComponent diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 137bd8e..9cd284c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -7,7 +7,10 @@ import { ResumeComponent } from './resume/resume.component'; import { LinksComponent } from './links/links.component'; import { AppRoutingModule } from './app-routing.module'; +import { AboutRoutingModule } from './about/about-routing.module'; import { UserComponent } from './user/user.component'; +import { EarlyLifeComponent } from './about/early-life.component'; +import { CareerComponent } from './about/career.component'; @NgModule({ declarations: [ @@ -15,11 +18,14 @@ import { UserComponent } from './user/user.component'; AboutComponent, ResumeComponent, LinksComponent, + EarlyLifeComponent, + CareerComponent, UserComponent ], imports: [ BrowserModule, - AppRoutingModule + AppRoutingModule, + AboutRoutingModule ], providers: [], bootstrap: [AppComponent]