ekangularbase
Version:
Authentication service for usermanagement(oidc client)
16 lines (11 loc) • 339 B
text/typescript
import { Directive , AfterViewInit ,ElementRef } from '@angular/core';
({
selector: '[defFocus]'
})
export class DefFocusDirective implements AfterViewInit {
constructor(private el: ElementRef) { }
ngAfterViewInit(){
console.log('rendered 😁');
console.log(this.el.nativeElement.focus())
}
}