Wrapping Up

Directives are just components but without views.

We attach directives to elements by adding them as attributes.

Angular provides a small number of built-in directives and in this section we covered all of them, including:

  • NgFor

  • NgIf

  • NgSwitch

  • NgClass

  • NgNonBindable

In the next section we will create our own custom directives.

Caught a mistake or want to contribute to the book? Edit this page on GitHub!

Learn Angular For FREE

I've released my 700 page Kick Starter funded Angular book for FREE