There are four types of directives in Angular,
- Components directives.
- Structural directives.
- Attribute directives.
- Custom Directive.
How many directives are there in Angular?
The three types of directives in Angular are attribute directives, structural directives, and components.
What are different types of directives in Angular?
The different types of Angular directives are as follows: Components—directives with a template.
...
Built-in attribute directiveslink
...
Built-in attribute directiveslink
- NgClass —adds and removes a set of CSS classes.
- NgStyle —adds and removes a set of HTML styles.
- NgModel —adds two-way data binding to an HTML form element.