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