Smart data table library with sorting, filtering, pagination & add/edit/delete functions.
- First thing you need to do is to import the ng2-smart-table directives into your component.
- Then register it by adding to the list of directives of your module:
Now, we need to configure the table and add it into the template.
- The only required setting for the component to start working is a columns configuration.
- Let’s register settings property inside of the component where we want to have the table and configure some columns Settings documentation:
Finally let’s put the ng2-smart-table component inside of the template:
At this step you will have a minimal configured table.
- To add some, let’s create an array property with a list of objects in the component.