Newer
Older
AfterContentChecked,
Directive, ElementRef
import { DomSanitizer } from '@angular/platform-browser';
import { UIElement } from '../interfaces/elements';
export abstract class ElementComponent implements AfterContentChecked {
constructor(public elementRef: ElementRef, public sanitizer: DomSanitizer) {}
get domElement(): Element {
return this.elementRef.nativeElement;
}
ngAfterContentChecked(): void {
this.project = this.elementRef.nativeElement.closest('aspect-element-splitter') ? 'player' : 'editor';