Today, we are going to talk about Angular Component Communication, the last version of Angular is @9, but I will show definitions to communicate in all angular versions, probably it will be in the angular platform for a long time. If you need to start with basic concepts in Angular I recommend for you the tour of heroes before reading this article. Here

Angular is based on components, so if you start to create a page in angular you should split this page into small components, each component is a container for a small logic, HTML, and CSS when you have a lot of components you have a big problem called “Communication” How can I communicate with these components? Or what is the best way to communicate my components? In the next image here I’m showing some components and how you need to communicate with parents with children, siblings, child to parent, and more cases.

Ways To Communicate

  1. Input / Output
  2. Services
  3. ViewChild
  4. Event Bus Service
  5. State Management

#frontend #front-end-development #angular #angular-programming #web-development #web-components #javascript #ui

Component Interactions in Angular
1.45 GEEK