In Angular2 how can I set binding on element focus. I don\'t want to set it with elementRef. I think in AngularJS there is ngFocus directive In Angular2 there is no such dir
import { Directive, ElementRef, AfterViewChecked } from '@angular/core'; @Directive({ selector: '[autoFocus]', }) export class FocusDirective implements AfterViewChecked { constructor(private _elementRef: ElementRef) { } ngAfterViewChecked() { this._elementRef.nativeElement.focus() } }