Angular 8 DirectivesThe Angular 8 directives are used to manipulate the DOM. By using Angular directives, you can change the appearance, behavior or a layout of a DOM element. It also helps you to extend HTML. Angular 8 directives can be classified in 3 categories based on how they behave:
Component Directives: Component directives are used in main class. They contain the detail of how the component should be processed, instantiated and used at runtime. Structural Directives: Structural directives start with a * sign. These directives are used to manipulate and change the structure of the DOM elements. For example, *ngIf directive, *ngSwitch directive, and *ngFor directive.
Attribute Directives: Attribute directives are used to change the look and behavior of the DOM elements. For example: ngClass directive, and ngStyle directive etc.
Next TopicAngular 8 ngIf Directive
|