michaelbromley / michaelbromley/angularUtils
dirPagination: current-page re-uses old value from previous call on second call
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 842
- PR merge metrics
- No merged PRs in 30d
Description
Description of issue:
seems that the previous directive does not get cleaned up after the first call AND that the re-initialization of current-page does not work correctly on the second call
Steps to reproduce:
- open page with dirPagination directive (id "test") & initialise "current-page" from variable "pagination.current"
- open page again with dirPagination directive (id "test") & initialise "current-page" from variable "pagination.current" with different value
Expected result:
- current-page value from second call is used
Actual result:
- current-page value from first call is used
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the dirPagination directive using the two initialization sequences described in the issue, changing pagination.current between calls. Trace how the directive handles cleanup and current-page initialization; done means the second call uses its new current-page value rather than the value from the first call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angularjs, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100