File
Extends
Metadata
| changeDetection |
ChangeDetectionStrategy.OnPush |
| selector |
cx-org-status-cell |
| templateUrl |
./status-cell.component.html |
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { CellComponent } from '../cell.component';
@Component({
selector: 'cx-org-status-cell',
templateUrl: './status-cell.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class StatusCellComponent extends CellComponent {
get label() {
if (this.isActive === undefined) {
return;
}
return this.isActive ? 'organization.enabled' : 'organization.disabled';
}
get isActive(): boolean {
return this.model.active;
}
}
<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="{{ label | cxTranslate }}"
[class.is-active]="isActive"
*ngIf="label"
>
{{ label | cxTranslate }}</span
>
</ng-template>
Legend
Html element with directive