Skip to content

Commit

Permalink
feat(ngTableParams): allow getData to return an array of data
Browse files Browse the repository at this point in the history
This simplifies using ng-table with in memory lists of data
  • Loading branch information
ccrowhurstram committed Aug 2, 2015
1 parent 155ef62 commit ab9ffdf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scripts/03-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ app.factory('NgTableParams', ['$q', '$log', 'ngTableDefaults', function($q, $log
// If getData resolved the $defer, and didn't promise us data,
// create a promise from the $defer. We need to return a promise.
pData = $defer.promise;
} else {
pData = $q.when(pData);
}
return pData.then(function(data) {
settings.$loading = false;
Expand Down

0 comments on commit ab9ffdf

Please sign in to comment.