]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/angular/autofocus.directive.ts
Improve login page UI
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / angular / autofocus.directive.ts
CommitLineData
a3664dfd
C
1import { AfterViewInit, Directive, ElementRef } from '@angular/core'
2
3@Directive({
9df52d66 4 selector: '[myAutofocus]'
a3664dfd
C
5})
6export class AutofocusDirective implements AfterViewInit {
7 constructor (private host: ElementRef) { }
8
9 ngAfterViewInit () {
10 this.host.nativeElement.focus()
11 }
12}