ng2-smart-table-other-extended
Angular Smart Table (v 1.3.5) - Extended in another way
Last updated 2 years ago by jonathan002 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ng2-smart-table-other-extended 
SYNC missed versions from official npm registry.

ng2-smart-table-other-extended

This is a extended version of ng2-smart-table that allows you to simply specify classes for each table cell directly in the source data that is provided to the table. (Note: Please do not confuse this repo with ng2-smart-table-extended.. This is the OTHER extended fork and was just made to satisfy my project needs. Anyone that would like to use this code is free to do anything they like with it).

Somewhere in your component.ts / .js file..

// example settings
settings = {
    columns: {
      id: {
        title: 'ID',
      },
      name: {
        title: 'Full Name',
        type: 'custom',
        renderComponent: CustomRenderComponent,
      },
      username: {
        title: 'User Name',
      },
      link: {
        title: 'Link',
        type: 'html',
        editor: {
          type: 'custom',
          component: CustomEditorComponent,
        },
      },
    },
  };
  
// example source data
data = [
    {
      id: 1,
      name: {
        td: 'Test Graham',
        class: 'my-own-class' // <-- feature added
      },
      username: 'Bret',
      link: '<a href="http://www.google.com">Google</a>',
    },
    {
      id: 2,
      name: 'Ervin Howell', // can also still use like normal..
      username: 'Antonette',
      link: '<a href="https://github.com/akveo/ng2-admin">Ng2 Admin</a>',
    }
]

In .html template file

<ng2-smart-table [settings]="settings" [source]="data"></ng2-smart-table>

Ng2 Smart Table Info and Documentation,

For more info on ng2-smart-table and it's full documentation see the original repo.

License

MIT license.

Current Tags

  • 1.0.4                                ...           latest (2 years ago)

5 Versions

  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |