1 import { AfterViewInit, Directive, ElementRef } from '@angular/core';
3 import * as _ from 'lodash';
6 selector: '[autofocus]' // tslint:disable-line
8 export class AutofocusDirective implements AfterViewInit {
9 constructor(private elementRef: ElementRef) {}
12 const el: HTMLInputElement = this.elementRef.nativeElement;
13 if (_.isFunction(el.focus)) {