From 71ef828b671cd22e59f77168ddd747b87550621f Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Tue, 20 Jun 2017 00:35:41 -0400 Subject: [PATCH] Alter the resume route to accept params --- router/src/app/app-routing.module.ts | 2 +- url_params.md | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/router/src/app/app-routing.module.ts b/router/src/app/app-routing.module.ts index bdcaba0..e7db1e1 100644 --- a/router/src/app/app-routing.module.ts +++ b/router/src/app/app-routing.module.ts @@ -11,7 +11,7 @@ const routes: Routes = [ component: AboutComponent }, { - path: 'resume', + path: 'resume/:id', component: ResumeComponent }, { diff --git a/url_params.md b/url_params.md index 4855952..15cf655 100644 --- a/url_params.md +++ b/url_params.md @@ -81,3 +81,24 @@ In `src/app.app.component.html` loop through the jobs to create links: ``` + +## Alter the resume route to accept params + +Our resume route in `src/app/app-routing.module.ts` no longer works. Update it to accept params: + +```javascript +const routes: Routes = [ + { + path: 'about', + component: AboutComponent + }, + { + path: 'resume/:id', + component: ResumeComponent + }, + { + path: 'links', + component: LinksComponent + } +]; +```