All files / src/app/shared/cms/components/content-navigation content-navigation.component.ts

100% Statements 6/6
75% Branches 3/4
100% Functions 2/2
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 342x     2x 2x                     2x                       7x     7x      
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
 
import { CMSFacade } from 'ish-core/facades/cms.facade';
import { ContentPageTreeView } from 'ish-core/models/content-page-tree-view/content-page-tree-view.model';
import { ContentPageletEntryPointView } from 'ish-core/models/content-view/content-view.model';
 
/**
 * The Content Page Navigation Component to get content page hierarchy navigation.
 */
@Component({
  selector: 'ish-content-navigation',
  templateUrl: './content-navigation.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ContentNavigationComponent implements OnInit {
  /**
   * Content Page Tree to be rendered
   */
  @Input({ required: true }) contentPageTree: ContentPageTreeView;
  /**
   * Max Depth of page tree
   */
  @Input({ required: true }) depth: number;
 
  currentContentPage$: Observable<ContentPageletEntryPointView>;
 
  constructor(private cmsFacade: CMSFacade) {}
 
  ngOnInit() {
    this.currentContentPage$ = this.cmsFacade.contentPage$;
  }
}