Directives - sravanthimendu98/angular GitHub Wiki
Structural Directives:
*ngIf: Conditionally includes or excludes an element in the DOM.
*ngFor : Repeats an element for each item in a list.
*ngSwitch, *ngSwitchCase, *ngSwitchDefault: Conditionally includes one of the nested elements based on a matching expression.
The *ngSwitch directive is used to switch between different views based on the value of currentView.
The *ngSwitchCase directives display the corresponding content if the value of currentView matches the case.
The *ngSwitchDefault directive displays content when no cases match the value of currentView.
Attribute Directives:
ngClass : Add/remove styles based on property.
ngStyle : apply inline styles
ngModel : used for two-way data binding.
Component Directives:
@Component