List all the built-in attribute directives
In Angular, built-in attribute directives are directives that change the behavior or appearance of existing elements.
Main directives
NgClass- dynamically adds/removes CSS classes on an element. Accepts a string, an array, or an object with class names as keys and boolean values.NgStyle- dynamically changes an element's styles through a "property: value" object.NgModel- two-way binding of a form element's value to a component variable ([(ngModel)]).NgModelGroup- logical grouping of severalNgModelinstances inside a form for validation and structure.NgForm- a directive for<form>that tracks the form's state: validity, errors, changes.NgFormControl- a deprecated directive for managing individual form controls (the modern approach isFormControl).NgControl- the base class for all form control directives.NgControlStatusandNgControlStatusGroup- automatically add CSS classes (ng-valid,ng-invalid,ng-dirty,ng-pristine,ng-touched,ng-untouched) depending on the state of the control or group.NgSwitch,NgSwitchCase,NgSwitchDefault- control the display of elements based on an expression's value (*ngSwitchon the container,*ngSwitchCase/*ngSwitchDefaulton children).NgTemplateOutlet- allows dynamically rendering the content of<ng-template>.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.