core/data-grid/column/cell-renderer.component.ts
changeDetection | ChangeDetectionStrategy.OnPush |
selector | c8y-cell-renderer |
templateUrl | ./cell-renderer.component.html |
Properties |
Methods |
Inputs |
Accessors |
constructor(injector: Injector, cd: ChangeDetectorRef)
|
|||||||||
Parameters :
|
spec |
ngDoCheck |
ngDoCheck()
|
Returns :
void
|
ngOnChanges |
ngOnChanges()
|
Returns :
void
|
prevSpec |
Type : CellRendererSpec
|
rendererInjector |
Type : Injector
|
rendererType |
Type : "TEMPLATE" | "COMPONENT"
|
spec |
Type : CellRendererSpec
|
_spec | ||||||
set_spec(spec: CellRendererSpec)
|
||||||
Parameters :
Returns :
void
|
<ng-container *ngIf="spec.renderer">
<ng-container
*ngIf="rendererType === 'TEMPLATE'"
[ngTemplateOutlet]="spec.renderer"
[ngTemplateOutletContext]="{ $implicit: spec.context }"
>
</ng-container>
<ng-container
*ngIf="rendererType === 'COMPONENT'"
[ngComponentOutlet]="spec.renderer"
[ngComponentOutletInjector]="rendererInjector"
>
</ng-container>
</ng-container>
<ng-container *ngIf="!spec.renderer">
<span title="{{ spec.context.value }}">
{{ spec.context.value }}
</span>
</ng-container>