13 lines
269 B
TypeScript
13 lines
269 B
TypeScript
|
import { Directive, ElementRef, HostListener } from "@angular/core";
|
||
|
|
||
|
@Directive({
|
||
|
selector: "[appBlurClick]",
|
||
|
})
|
||
|
export class BlurClickDirective {
|
||
|
constructor(private el: ElementRef) {}
|
||
|
|
||
|
@HostListener("click") onClick() {
|
||
|
this.el.nativeElement.blur();
|
||
|
}
|
||
|
}
|