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)
|
||||||
|
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
|
| template |
Type : any
|
Decorators :
@ViewChild('template', {static: false})
|
<ng-template #template>
<li >
<a class="c8y-right-drawer__link" (click)="onClick()" [attr.data-cy]="dataCy" *ngIf="link" [attr.href]="link" [attr.target]="target">
{{ label | translate }}
<ng-content></ng-content>
</a>
<button *ngIf="!link" (click)="onClick()" [attr.data-cy]="dataCy" type="button" class="c8y-right-drawer__link">
{{ label | translate }}
<ng-content></ng-content>
</button>
</li>
</ng-template>