Directives
What are directives?
TypeScript classes to manipulate DOM elements
Operate on existing elements
Don't have a template
Angular provides several directives: ngStyle, ngClass, ngModel

Creating custom directives
ng generate directive highlight or ng g d highlight
Directive Usage
Directive User Events
If we wanted to highlight the text only when the user mouses over the element, then we would need to react to user events.
Passing Inputs to a Directive
Summary
What are directives?
Creating custom directives
Handling user events
Passing inputs to directive
Last updated