I am new in angular 2 so please help me.
I want to implement angular 2 and angular 4 to get data from database and apply server side pagination on it.
There is a NPM package that handles this for you ngx-pagination
There are documents there that outline exactly how to get it working. You can see a live demo here, which includes a server side paging example with code
npm install ngx-pagination --save. See the links in my answer for details