O'Reilly logo

Angular 2 Development with TypeScript by Yakov Fain and Anton Moiseev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required