Skip to content

Commit

Permalink
Update to v0.11.1
Browse files Browse the repository at this point in the history
See release notes
  • Loading branch information
michaelbromley committed Apr 1, 2016
1 parent 7c25c68 commit b1f2290
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ dependency management via Bower, npm and other package managers.

All documentation is also located in the [angularUtils project](https://github.com/michaelbromley/angularUtils/tree/master/src/directives/pagination).

## Changelog

Please see the [releases page](https://github.com/michaelbromley/angularUtils-pagination/releases) for details
of each released version.

## Issues

Please submit any issues to the [angularUtils issue tracker](https://github.com/michaelbromley/angularUtils/issues), not this one.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angularUtils-pagination",
"version": "0.11.0",
"version": "0.11.1",
"homepage": "https://github.com/michaelbromley/angularUtils/tree/master/src/directives/pagination",
"authors": [
"Michael Bromley <michael@michaelbromley.co.uk>"
Expand Down
15 changes: 10 additions & 5 deletions dirPagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@
// Now that we have access to the `scope` we can interpolate any expression given in the paginationId attribute and
// potentially register a new ID if it evaluates to a different value than the rawId.
var paginationId = $parse(attrs.paginationId)(scope) || attrs.paginationId || DEFAULT_ID;

// (TODO: this seems sound, but I'm reverting as many bug reports followed it's introduction in 0.11.0.
// Needs more investigation.)
// In case rawId != paginationId we deregister using rawId for the sake of general cleanliness
// before registering using paginationId
paginationService.deregisterInstance(rawId);
// paginationService.deregisterInstance(rawId);
paginationService.registerInstance(paginationId);

var repeatExpression = getRepeatExpression(expression, paginationId);
Expand Down Expand Up @@ -105,12 +108,14 @@

// Delegate to the link function returned by the new compilation of the ng-repeat
compiled(scope);


// (TODO: Reverting this due to many bug reports in v 0.11.0. Needs investigation as the
// principle is sound)
// When the scope is destroyed, we make sure to remove the reference to it in paginationService
// so that it can be properly garbage collected
scope.$on('$destroy', function destroyDirPagination() {
paginationService.deregisterInstance(paginationId);
});
// scope.$on('$destroy', function destroyDirPagination() {
// paginationService.deregisterInstance(paginationId);
// });
};
}

Expand Down
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package.describe({
name: 'angularutils:pagination',
summary: 'Magical automatic pagination for anything in AngularJS',
version: '0.11.0',
version: '0.11.1',
git: 'https://github.com/michaelbromley/angularUtils-pagination'
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-utils-pagination",
"version": "0.11.0",
"version": "0.11.1",
"description": "Magical automatic pagination for anything in AngularJS",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit b1f2290

Please sign in to comment.