In this article we will learn how to create a directive and use it in Angular 9.
It has been said that directives are perhaps the most important bit of an Angular application. As a matter of a fact one of the most-used Angular unit, the component, is actually a directive.
According to Angular 9 documentation on attribute directive there are three kinds of directives in Angular:
- Components — directives with a template.
- Structural directives — change the DOM layout by adding and removing…