Skip to content
Snippets Groups Projects
  • jojohoch's avatar
    59ef92c9
    [player] Add layout options for pages · 59ef92c9
    jojohoch authored
    * Pages can be scrolled or tabbed
    * Labels of pages can be shown and hidden
    * Always visible pages can be left, right, top or bottom
    * Layout of pages is now handled in `LayoutComponent` and removed from
    `PlayerStateComponent`
    * Due to the `ScrollIndexDirective`, pages with scrollbars have similar
    interfaces as pages with tabs
    59ef92c9
    History
    [player] Add layout options for pages
    jojohoch authored
    * Pages can be scrolled or tabbed
    * Labels of pages can be shown and hidden
    * Always visible pages can be left, right, top or bottom
    * Layout of pages is now handled in `LayoutComponent` and removed from
    `PlayerStateComponent`
    * Due to the `ScrollIndexDirective`, pages with scrollbars have similar
    interfaces as pages with tabs
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
hide-first-child.directive.ts 421 B
import {
  Directive, ElementRef, Input
} from '@angular/core';

@Directive({
  selector: '[appHideFirstChild]'
})
export class HideFirstChildDirective {
  @Input() hideFirstChild!: boolean;

  constructor(private elementRef: ElementRef) {}

  ngOnInit(): void {
    if (this.hideFirstChild && this.elementRef.nativeElement.firstChild) {
      this.elementRef.nativeElement.firstChild.style.display = 'none';
    }
  }
}