import { Directive, ElementRef, HostListener } from "@angular/core";

@Directive({
    selector: '[clickOnEnter]'
})
export class ClickOnEnterDirective{
    constructor(private element: ElementRef){ }

    onEnterPress(event) {
        this.element.nativeElement.focus();
        this.element.nativeElement.click();
    }

}