File

src/components/ngx-lighttable-cell.component.ts

Metadata

selector ngx-lighttable-cell
templateUrl ./ngx-lighttable-cell.component.html

Inputs

cellClass

Type: NgClass

cellStyle

Type: NgStyle

field

Type: string

Properties

Static defaultTemplateRef
defaultTemplateRef: TemplateRef<any>
Decorators : ViewChild
Static templateRef
templateRef: TemplateRef<any>
Decorators : ContentChild
import {Component, Input, ContentChild, TemplateRef, ViewChild} from '@angular/core';
import {NgStyle, NgClass} from '@angular/common';

@Component({
    selector: 'ngx-lighttable-cell',
    templateUrl: './ngx-lighttable-cell.component.html'
})
export class NgXLightTableCellComponent {
    /**
     * @description Identifies the property to be displayed on the current cell
     */
    @Input()
    public field: string;

    /**
     * @description NgStyles to bind to the cell
     */
    @Input()
    public cellStyle: NgStyle;

    /**
     * @description NgClass to bind to the cell
     */
    @Input()
    public cellClass: NgClass;

    /**
     * @description Child template TemplateRef
     */
    @ContentChild(TemplateRef)
    public templateRef: TemplateRef<any>;

    /**
     * @description Default TemplateRef to use in case no template is passed in
     */
    @ViewChild('defaultTemplate')
    public defaultTemplateRef: TemplateRef<any>;
}
<ng-template let-content #defaultTemplate>
    <span [ngClass]="cellClass"
          [ngStyle]="cellStyle">
        {{content}}
    </span>
</ng-template>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""