Chapter 6. Implementing component communications
This chapter covers
- Creating loosely coupled components
- How a parent component should pass data to its child, and vice versa
- Implementing the Mediator design pattern to create reusable components
- A component lifecycle
- Understanding change detection
We’ve established that any Angular application is a tree of components. While designing components, you need to ensure that they’re reusable and self-contained and at the same time have some means for communicating with each other. In this chapter, we’ll focus on how components can pass data to each other in a loosely coupled manner.
First, we’ll show you how a parent component can pass data to its child by binding to the input properties of ...