Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

import { Directive, ElementRef, AfterViewInit, Input } from '@angular/core';
import { Element } from '@angular/compiler';

@Directive({
selector: '[appAutofocus]'
})
export class AutofocusDirective implements AfterViewInit {
@Input() appAutofocusDisplay = true;
constructor(private el: ElementRef) {}
ngAfterViewInit() {
if (this.appAutofocusDisplay) {
// added setTimeout to work with IE's slow loading
setTimeout(() => this.el.nativeElement.focus(), 100);
}
}
}