If you have developed modern web applications in Angular, you have inevitably run into a situation in which you need to share data among components (from parent to child, child to parent, child to grandparent, or *gasp* sibling to sibling).
In this article, originally posted on Medium, we’ll create a basic shopping cart application to explore best practices for sharing data and business logic between components using Services powered by RxJS Observables and BehaviorSubjects.
https://vidalquevedo.medium.com/how-to-share-data-between-components-in-angular-a-shopping-cart-example-b86ce8254965
Categories