Chapter 7. Putting It All Together

It's time to take everything we have learned about components and put it into practice. In this chapter, we will build useful components. We will also learn about Angular 2 change detection and the component life cycle.

The following are the topics that we will cover:

  • Resetting the development environment
  • Building a simple accordion component
  • Extending the accordion component tree
  • Extending hooking to the component life cycle events

Preparing our development environment

It's time to create a new project with angular-cli as described in Chapter 2, Setting Up an Angular 2 Development Environment with angular-cli. We will create a new directory called components to contain all the components we will implement in this chapter. ...

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