![]() |
VOOZH | about |
Introduction on Smart table:
It is an Angularjs module used for display purpose as a table format with a set of features like filtering, sorting, etc., This is very much helpful during report preparation, filtering and searching of data in a quicker manner in angular js. It is lightweight, developer-friendly, robust, modular, and extensible
Approaches:
Syntax:
Basic Examples and Explanations:
Let us see the sample code of searching in the smart table along with filtering and pagination is seen in below code
Data is retrieved from "http://coderszine.com/demo/rest-api/v1/employee/read" for our sample
stSafeSrc attribute:
As we have taken data from the restful endpoint (even from a remote database, restful endpoint, ajax call, etc) we need to use this attribute without fail. Moreover smart table creates a copy of the displayed collection and since asynchronous data is involved, this attribute is a must.
Here "employees" retrieved as asynchronously and need to be rendered and it is specified in st-safe-src
sort is applied on all columns and hence st-sort is given for sorting.
pagination is applied to have 5 records per page.
Input : 👁 ImageWith the above approaches, let us render the data in a smart table with search, sort, and pagination functionalities
HTML: Output: 👁 Image