Working with route parameters
Whether it is about building a REST API using Node.js or configuring routes in Angular, setting up routes is an absolute art, especially when it comes to working with parameters. In this recipe, you'll create some routes with parameters and will learn how to get those parameters in your components once the route is active.
Getting ready
The project for this recipe resides in chapter07/start_here/working-with-route-params
:
- Open the project in Visual Studio Code.
- Open the terminal and run
npm install
to install the dependencies of the project. - Once done, run
ng serve -o
.This should open the app in a new browser tab. As soon as the page is opened, you should see a list of users.
- Tap the first user, and you should see the following view:
Now that we have the app running locally, let's see the steps of the recipe in the next section...