Raj Swami
Raj Swami

Reputation: 75

AngularJS how to change pagination while search

I have used ng-table for my table which works well for pagination, sorting. and I have used ng-model for filtering table data (in short search). My problem is when I do search it is searching but suppose the word I am searching is at page 3 so it not shows anything till I do not do show all records (till I do not remove pagination). I want to remove pagination automatically while search or anything so that the record will come on first page.

Help me, Thanks in advance.

Upvotes: 1

Views: 319

Answers (1)

Gokul Thulaseedharan
Gokul Thulaseedharan

Reputation: 343

I think you are currently using pagination in client side data.the better approach is to use the searching in server side return result using limit and offset.

Upvotes: 2

Related Questions