UNPKG

ekangularbase

Version:

Authentication service for usermanagement(oidc client)

16 lines (11 loc) 339 B
import { Directive , AfterViewInit ,ElementRef } from '@angular/core'; @Directive({ selector: '[defFocus]' }) export class DefFocusDirective implements AfterViewInit { constructor(private el: ElementRef) { } ngAfterViewInit(){ console.log('rendered 😁'); console.log(this.el.nativeElement.focus()) } }