© Mark Clow 2018
Mark ClowAngular 5 Projectshttps://doi.org/10.1007/978-1-4842-3279-8_11

11. Introducing Directives

Mark Clow1 
(1)
Sandy Springs, Georgia, USA
 

Directives are markers on a DOM element (such as an attribute) that tell Angular to attach a specified behavior to an existing element.

Directives have been around since AngularJS. They’re quite complex to use, though they’re a lot easier to use in Angular, especially when it comes to passing data into directives. Directives used to be the main way of creating custom tags in an AngularJS application; now that’s been replaced by directives and components.

Angular itself provides many directives to help you in your coding. You can also code your own.

As Chapter 8 stated, components have three ...

Get Angular 5 Projects: Learn to Build Single Page Web Applications Using 70+ Projects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.