update tslint -> eslint

This commit is contained in:
2021-05-21 20:17:26 +02:00
parent 80260df71f
commit a195fafa6b
252 changed files with 3080 additions and 2420 deletions

View File

@@ -2,27 +2,21 @@ import {Directive, ElementRef, Input, OnInit, TemplateRef, ViewContainerRef} fro
import {UserService} from './user.service';
@Directive({
selector: '[appOwner]'
selector: '[appOwner]',
})
export class OwnerDirective implements OnInit {
private currentUserId: string;
private _appOwner: string;
private iAppOwner: string;
@Input() set appOwner(value: string) {
this._appOwner = value;
public constructor(private element: ElementRef, private templateRef: TemplateRef<unknown>, private viewContainer: ViewContainerRef, private userService: UserService) {}
@Input()
public set appOwner(value: string) {
this.iAppOwner = value;
this.updateView();
}
constructor(
private element: ElementRef,
private templateRef: TemplateRef<any>,
private viewContainer: ViewContainerRef,
private userService: UserService
) {
}
public ngOnInit(): void {
this.userService.userId$.subscribe(user => {
this.currentUserId = user;
@@ -33,9 +27,8 @@ export class OwnerDirective implements OnInit {
private updateView() {
this.viewContainer.clear();
if (this.currentUserId === this._appOwner) {
if (this.currentUserId === this.iAppOwner) {
this.viewContainer.createEmbeddedView(this.templateRef);
}
}
}