diff --git a/bower.json b/bower.json index c85adda..bf80e57 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angularUtils-pagination", - "version": "0.9.3", + "version": "0.9.4", "homepage": "https://github.com/michaelbromley/angularUtils/tree/master/src/directives/pagination", "authors": [ "Michael Bromley " diff --git a/dirPagination.js b/dirPagination.js index 99fb7cf..904b042 100644 --- a/dirPagination.js +++ b/dirPagination.js @@ -93,7 +93,8 @@ return collectionGetter(scope); }, function(collection) { if (collection) { - paginationService.setCollectionLength(paginationId, collection.length); + var collectionLength = (collection instanceof Array) ? collection.length : Object.keys(collection).length; + paginationService.setCollectionLength(paginationId, collectionLength); } }); } diff --git a/package.js b/package.js index 6a66769..beb31e3 100644 --- a/package.js +++ b/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'angularutils:pagination', summary: 'Magical automatic pagination for anything in AngularJS', - version: '0.9.3', + version: '0.9.4', git: 'https://github.com/michaelbromley/angularUtils-pagination' }); diff --git a/package.json b/package.json index 54d90ec..4b79050 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-utils-pagination", - "version": "0.9.3", + "version": "0.9.4", "description": "Magical automatic pagination for anything in AngularJS", "main": "index.js", "scripts": {