SHARE
TWEET
Untitled
a guest
Nov 30th, 2014
173
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- $scope.tableParams = new ngTableParams({
- page: 1, // show first page
- count: 10, // count per page
- sorting: {
- id: 'asc' // initial sorting
- }
- }, {
- total: data.length, // ERROR - data is undefined
- getData: function($defer, params) {
- var orderedData = params.sorting() ? $filter('orderBy')(data, params.orderBy()) : data;
- $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count()));
- }
- });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

