Chapter 2. Conquering Components and Directives

Your objective is to iterate through this and display the article title only if it is set as active. This chapter will cover the following recipes:

  • Using decorators to build and style a simple component
  • Passing members from a parent component to a child component
  • Binding to native element attributes
  • Registering handlers on native browser events
  • Generating and capturing custom events using EventEmitter
  • Attaching behavior to DOM elements with Directives
  • Projecting nested content using ngContent
  • Using ngFor and ngIf structural directives for model-based DOM control
  • Referencing elements using template variables
  • Attribute property binding
  • Utilizing component life cycle hooks
  • Referencing a parent component from a ...

Get Angular 2 Cookbook 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.