Standalone components and passing data through route params
In this recipe, we’ll learn how to work with standalone components and how to pass some data using route parameters to other components. Note that this is not limited to standalone components and can be achieved with regular components as well. The app’s starter code gives us a list view of some users. Our task is to implement the details
view using the route parameters.
Getting ready
The project that we are going to work with resides in start/apps/cc-standalone-components
inside the cloned repository:
- Open the code repository in your code editor.
- Open the terminal, navigate to the code repository directory, and run the following command to serve the project:
npm run serve cc-standalone-components
You should be able to see the app as follows:
Figure 1.17: Users list is shown for the app cc-standalone-components
How to do it…
- Create...