1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

add/edit folders

This commit is contained in:
Kyle Spearrin
2018-01-30 15:40:06 -05:00
parent 7c181ee5f3
commit 442042f59d
9 changed files with 194 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
import {
Directive,
ElementRef,
Input,
} from '@angular/core';
@Directive({
selector: '[appAutofocus]',
})
export class AutofocusDirective {
@Input() set appAutofocus(condition: boolean | string) {
this._autofocus = condition === '' || condition === true;
}
private _autofocus: boolean;
constructor(private el: ElementRef) { }
ngOnInit() {
if (this._autofocus) {
this.el.nativeElement.focus();
}
}
}