O'Reilly logo

Developing an Angular 2 Edge by Ran Wahle, Mary Gualtieri, Wojciech Kwiatek, Suguru Inatomi, Filip Lauc, Troy Mott

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

In this chapter we will be taking a look at directives and the role they play in an Angular 2 application. There are three types of directives in Angular 2. We have already covered one of them in the previous chapter. Components are in fact considered directives. To quote the Angular team:

A Component is really a directive with a template.

They are the most common type of directives. Now we will examine the remaining two types of directives:

  • Attribute directives
  • Structural directives

In common applications we don’t write a lot of attribute or structural directives. This is primarily because of how verbose Angular 2’s template binding is, and the few built in directives we get really cover a wast array of tasks that ...

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