File

core/navigator/navigator-outlet.component.ts

Description

The component shows all nodes that have been added to the navigator. In addition, it allows you to add a header and a footer to the navigator.

Example:

<c8y-navigator-outlet [nodes]="navigatorService.items$ | async" [open]="isOpen">
  <header class="navigator-slot-top"></header>
  <footer class="navigator-slot-bottom"></footer>
</c8y-navigator-outlet>

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(headerService: HeaderService, ngZone: NgZone)
Parameters :
Name Type Optional
headerService HeaderService No
ngZone NgZone No

Inputs

nodes
Type : NavigatorNode[]

Navigator nodes list.

open
Type : boolean
Default value : true

Determines whether the navigator menu should be open/closed.

Methods

collapseNavigator
collapseNavigator(from: "icon" | "expander" | "link")

Closes the navigator menu after clicking an item in the menu, in case of insufficient screen width.

Parameters :
Name Type Optional
from "icon" | "expander" | "link" No
Returns : void

Properties

isShown$
Type : BehaviorSubject<boolean>
Default value : new BehaviorSubject<boolean>(false)

Determines whether the navigator pane should be rendered.

<nav class="navigator" *ngIf="isShown$ | async" [ngClass]="{ open: open }">
  <ng-content select=".navigator-slot-top"></ng-content>
  <div class="navigatorContent">
    <c8y-navigator-node
      (nodeClick)="collapseNavigator($event)"
      [node]="node"
      *ngFor="let node of nodes; trackBy: trackByPathOrLabel"
      [isRoot]="true"
    ></c8y-navigator-node>
  </div>
  <ng-content select=".navigator-slot-bottom"></ng-content>
</nav>

results matching ""

    No results matching ""