all attribute directives in angular 10 code example Example: user defined directives in angular 7 import { Directive, ElementRef } from '@angular/core';