How to Send data through routing paths in Angular
Daily Angular Tips, Tricks, and Best Practices: Part 9
As a developer, there is no limit to learning. We always need to be up to date with technologies as well as the upcoming or current features which are trending in the market.
Photo by Ben Whiteu on Unsplash
Recently, I was looking for the best techniques to write clean and optimize my angular code. I have gone through a lot of articles, and as we know, it is limitless. Then I thought of consolidating the checklist with different Basic Angular Topics which helped me and might help others too in the future.
These small articles not only help you to write a better and clean Angular Code but also clear the concepts of front-end technologies. This will help you to build your strong base and can help you in the upcoming frontend interviews.
Let’s move towards our main discussion.
Passing data between components is one of the common tasks which we do in frontend development. Sometimes when we don’t have state maintained in our application we can use the angular router feature to pass the data between the components.
We can achieve this like this using
@angular/routerwhich does support the route state and navigationExtras, which takes an object literal similar to
Let’s checkout different approaches to achieve this functions.
Install Angular in easy step by step process. Firstly Install Node.js & npm, then Install Angular CLI, Create workspace and Deploy your App.
What is Angular? What it does? How we implement it in a project? So, here are some basics of angular to let you learn more about angular. Angular is a Typesc
How to setup import path aliases in Angular9 and why you should do it as the first thing for any Angular project. Short TypeScript Import Paths in Angular9