feature-libs/organization/administration/components/shared/table/roles/roles-cell.component.ts
| changeDetection | ChangeDetectionStrategy.OnPush |
| selector | cx-org-roles-cell |
| templateUrl | ./roles-cell.component.html |
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { CellComponent } from '../cell.component';
@Component({
selector: 'cx-org-roles-cell',
templateUrl: './roles-cell.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class RolesCellComponent extends CellComponent {}
<a
*ngIf="linkable; else text"
[routerLink]="{ cxRoute: route, params: routeModel } | cxUrl"
[tabindex]="tabIndex"
>
<ng-container *ngTemplateOutlet="text"></ng-container>
</a>
<ng-template #text>
<ul class="text">
<li
*ngFor="let role of model.roles"
class="li"
[innerText]="'organization.userRoles.' + role | cxTranslate"
></li>
<li *ngIf="model.roles?.length === 0">-</li>
</ul>
</ng-template>