michaelbromley / michaelbromley/angularUtils

dir-paginate passes undefined to ng-if even when object is defined

Open
#447 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2k
Forks
842
PR merge metrics
No merged PRs in 30d

Description

It's hard for me to know which version of `dir-paginate` I have as it's not stated in the source. Whichever version was current as of Dec 13, 2015.

Edit: I just grabbed the latest version as of this posting off of github and the problem persists.

**Description of issue**: When using `dir-paginate` with `ng-if` the collection entry is always passed as undefined. If `dir-paginate` is replaced with `ng-repeat` everything works fine.

``

`historyEntry` is always passed to `isRequiredRoleToView` as undefined despite `HistoryLog` being fully populated with no null entries.

If I replace `dir-paginate` with `ng-repeat` then `historyEntry` is passed to `isRequiredRoleToView` properly (it's defined).

``
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the interaction using the provided dir-paginate/ng-if markup, comparing it with the ng-repeat example. Trace where dir-paginate supplies historyEntry and confirm the issue is resolved when ng-if receives the defined collection entry rather than undefined.

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
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.