What are directives?
Directives add behaviour to an existing DOM element or an existing component instance.
import { Directive, ElementRef, Input } from '@angular/core';@Directive({ selector: '[myHighlight]' })export class HighlightDirective {constructor(el: ElementRef) {el.nativeElement.style.backgroundColor = 'yellow';}}
Now this directive extends HTML element behavior with a yellow background as below
<p myHighlight>Highlight me!</p>
March 20, 2022
1383
Read more
What is Angular Framework?
November 04, 2022
AngularWhat is a Angular module?
November 03, 2022
AngularWhat are the steps to use animation module?
October 31, 2022
Angular