core/user/user-menu-item.component.ts
selector | c8y-user-menu-item |
templateUrl | ./user-menu-item.component.html |
Properties |
Methods |
Inputs |
Outputs |
constructor(userService: UserMenuService, headerService: HeaderService)
|
|||||||||
Parameters :
|
dataCy |
Type : string
|
icon |
Type : string
|
label |
Type : string
|
link |
Type : string
|
priority |
Type : number
|
Default value : 0
|
target |
Type : string
|
click |
Type : EventEmitter
|
ngAfterViewInit |
ngAfterViewInit()
|
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
onClick |
onClick()
|
Returns :
void
|
open$ |
Type : Observable<boolean>
|
template |
Type : any
|
Decorators :
@ViewChild('template', {static: false})
|
<ng-template #template>
<li>
<a
class="c8y-right-drawer__link"
[attr.tabindex]="(open$ | async) ? '0' : '-1'"
(click)="onClick()"
[attr.data-cy]="dataCy"
*ngIf="link"
[attr.href]="link"
[attr.target]="target"
>
{{ label | translate }}
<ng-content></ng-content>
</a>
<button
class="c8y-right-drawer__link"
[attr.tabindex]="(open$ | async) ? '0' : '-1'"
type="button"
*ngIf="!link"
(click)="onClick()"
[attr.data-cy]="dataCy"
>
{{ label | translate }}
<ng-content></ng-content>
</button>
</li>
</ng-template>