feature-libs/organization/administration/components/shared/table/unit/unit-cell.component.ts
| changeDetection | ChangeDetectionStrategy.OnPush |
| selector | cx-org-unit-cell |
| templateUrl | ../cell.component.html |
Accessors |
| property |
getproperty()
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { CellComponent } from '../cell.component';
@Component({
selector: 'cx-org-unit-cell',
templateUrl: '../cell.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UnitCellComponent extends CellComponent {
get property() {
return this.model.unit?.name ?? this.model.orgUnit?.name;
}
}
<a
*ngIf="linkable; else text"
[routerLink]="{ cxRoute: route, params: routeModel } | cxUrl"
[tabIndex]="tabIndex"
>
<ng-container *ngTemplateOutlet="text"></ng-container>
</a>
<ng-template #text>
<span class="text" title="{{ property }}">{{ property }}</span>
</ng-template>