Angular 2 - URLs and Navigation

Angular 2 URLs and Navigation

app.module.ts

Line 14: Add the "const: appRoutes: Routes..." as an array. Basically this is where you define the name of the url "directory" and it's corresponding component to go to when clicked.

Line 19: When you need to add a url param "www.site.com/people/id=1" this is where you'll do this. Although, in the actual Angular app url it will look more like "www.site.com/people/id/1". Whatever. You say "tomato", I say "ketchup"....