This is a simple, single-page application that gets data (generated with JSON Generator) from a fake REST API (I use json-server), sorts, paginates and displays them. The application requests data for one page at a time.
- Install json-server
npm install -g json-server
- Download
angular-paginationproject - cd to the path you have the
data.jsonfile and type:
json-server data.json
Now you have a fake REST API, dont interrupt it. Just click here to test it.
If you want to build it yourself, you will need to follow some additional steps:
- Install Angular
npm install -g @angular/cli
- Create new project
ng new myproject
- Copy downloaded files inside
srcand paste them in yourmyproject/srcfolder. - Using terminal, go to your
myprojectfolder and type:
ng serve --open
You are ready, the application must be running at localhost:4200