Enabling component interaction

In order to update current weather information, we need the city-search component to interact with the current-weather component. There are four main techniques to enable component interaction in Angular:

  • Global events
  • Parent components listening for information bubbling up from children components
  • Sibling, parent, or children components within a module that work off of similar data streams
  • Parent components passing information to children components

Get Angular 6 for Enterprise-Ready Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.