"getNew" function now receives object

`getNew` function now receives object instead of just `perPage`, no need to set the pagination manually now i.e
$scope.pagination.numPages = Math.ceil($scope.posts.length/$scope.pagination.perPage);

just pass the parameter in `getNew` function like this
$scope.pagination = Pagination.getNew({perPage: 10, resource: $scope.posts});