Link

Smart Property

Smart Property is an model and has some property.

export class SmartProperty {
    key: string;
    title: string;
    smartHtml?: (item, key) => string;
    inlineSearch ?= false;
    searchable ?= true;
    visible ?= true;
    width?: string;
    type?: SmartDataTypes = SmartDataTypes.Text;
}
PropertyExplanation
keyKey of one property of data
titleTitle of one of column Ng Smart Table
smartHtmlColumn definition of property
inlineSearchHas column inlineSearchable (default: false)
visibleIs visible column (default:true)
widthWidth of column
typeSmartDataTypes (default:Text)

Example SmartProperty


colDef = (item, key) => {
    return `<div class="name-cell-column"><a href="${item[`${key}`]}">${item[`${key}`]}</a></div>`;
  }

model: SmartModel = {
    properties: [
      {
        title: 'NAME',
        key: 'Name',
        inlineSearch: true,
        smartHtml: this.colDef,
        width: '300px'
      }
      ...
    ]
};