core/drawer/drawer-outlet/drawer-outlet.component.ts
OnChanges
selector | c8y-drawer-outlet |
templateUrl | ./drawer-outlet.component.html |
Properties |
Methods |
Inputs |
constructor(drawerService: DrawerService)
|
||||||
Parameters :
|
open |
Type : boolean
|
position |
Type : DrawerPositions
|
ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
Parameters :
Returns :
void
|
drawerItems$ |
Type : Observable<DrawerItem[]>
|
isLeft$ |
Type : Observable<boolean>
|
<nav
id="navigator"
class="navigator"
[attr.aria-label]="'Navigator' | translate"
[ngClass]="{ open: open }"
*ngIf="isLeft$ | async; else right"
>
<ng-template [ngTemplateOutlet]="content"></ng-template>
</nav>
<ng-template #right>
<aside class="c8y-right-drawer" [cdkTrapFocus]="open" [attr.aria-label]="'User menu' | translate">
<ng-template [ngTemplateOutlet]="content"></ng-template>
</aside>
</ng-template>
<ng-template #content>
<ng-container *ngFor="let drawerItem of drawerItems$ | async">
<ng-container *c8yComponentOutlet="drawerItem.component; environmentInjector: drawerItem.injector"></ng-container>
</ng-container>
</ng-template>