michaelbromley / michaelbromley/angularUtils
When calling $compile on a code containing dirPagination, registered pagination-id is not found
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 842
- PR merge metrics
- No merged PRs in 30d
Description
I'm dynamically pulling in HTML code and running it through $compile after adding it to my DOM and everything seems to be working except that I'm now getting the following error message: **pagination directive: the itemsPerPage id argument (id: locations) does not match a registered pagination-id**
It appears that the dir-paginate directive is getting compiled before the dir-pagination-controls directive and is therefore unable to find the registered pagination-id. How do I get around this?
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 dynamic HTML flow with $compile and the dir-paginate and dir-pagination-controls directives. Trace when the pagination-id is registered versus when the compiled pagination directive looks it up. Done means dynamically compiled code no longer reports that the locations pagination-id is unregistered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angularjs, javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100