cs-table v1.2.5
CsTable
This library was generated with Angular CLI version 9.0.7.
Usage
Reference: https://github.com/gitoutofbox/cs-table-lib-use/tree/master/projects/lib-test/src Step 1:
then in angular.json file in style add:
Step2:
Step 3: content of the component-loader.service.ts ActionEditComponent & ActionDeleteComponent components are just examples, if you dont need then no need to create and import, just leave the getComponent object blank.
Step 4: in component ts file:
Step 5: in component html: <cs-export btnClass="'btn btn-primary'"> <cs-table-filter pageId="pageId" (onFilterUpdate)="filterUpdate($event)"> <cs-table config="JSON.stringify(tableConfig)" (onCheck)="rowSelected($event)">
Database
To test run the server using : node server.js server files are here: https://github.com/gitoutofbox/cs-table-lib-use/tree/master/csTable-server
set databse, create DB & table: here is the (mysql) file: https://github.com/gitoutofbox/cs-table-lib-use/blob/master/angular_architecture.sql
Add css: open your angular.json file or index file and add follwing css: "node_modules/cs-table/css/style.css"
For reference check: https://github.com/gitoutofbox/cs-table-lib-use/tree/master/projects/lib-test/src
API response structure:
- GET filters: ex: http://localhost:8081/filters/1
- GET columns: http://localhost:8081/table/1
- POST, (get data by applied search): http://localhost:8081/table/1 Response: