File
Extends
Metadata
| changeDetection |
ChangeDetectionStrategy.OnPush |
| selector |
cx-org-amount-cell |
| templateUrl |
../cell.component.html |
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { CellComponent } from '../cell.component';
@Component({
selector: 'cx-org-amount-cell',
templateUrl: '../cell.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AmountCellComponent extends CellComponent {
get property(): string {
if (this.budget && this.currency) {
return this.budget + ' ' + this.currency;
}
return;
}
protected get budget() {
return this.model.budget;
}
protected get currency() {
return this.model.currency?.isocode || this.model.currency;
}
}
<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>
Legend
Html element with directive