Since pagination is a common task that many views will require we should refactor our pagination code from the traffic controller into a service that can be injected into any controller to paginate any data set. We are currently keeping quite a bit of pagination state as scope variable in the traffic control so there's a bit of work to be done to pass the pagination service the needed data set and have it return an object that contains all of the information needed for data-binding into the view.
Since pagination is a common task that many views will require we should refactor our pagination code from the traffic controller into a service that can be injected into any controller to paginate any data set. We are currently keeping quite a bit of pagination state as scope variable in the traffic control so there's a bit of work to be done to pass the pagination service the needed data set and have it return an object that contains all of the information needed for data-binding into the view.