Range filter infinite digest
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- angularjs
- Domain
- frontend
Research direction
The issue is about the 'range' pipe causing an infinite digest cycle when used with a transformer function. Start by examining the range filter implementation in the angular-filter library. The provided jsfiddle (https://jsfiddle.net/9coywzgt/5/) reproduces the problem; run it to see the error. Investigate how the transformer function interacts with AngularJS's digest cycle, and check if the returned object changes on each call. Look for existing tests related to the range filter to understand expected behavior. The fix likely involves ensuring the transformer output is stable across digest cycles.
Written by the indexing model from the issue text.
Description
Hello
I'm trying to use the range pipe with some controller variables like this:
<div ng-repeat="time in [] | range: $ctrl.end - $ctrl.start : $ctrl.start : 1 : $ctrl.transformer">
<span class="hour">{{time.hour}}</span> <span class="minutes">{{time.minutes}}</span>
</div>
The problem is this statement is giving me a infinite digest cycle. If I take the $ctrl.transformer function out the problem goes away, but I need that function to transform the input.
Please note that $ctrl.transformer is returning an Object like this:
$ctrl.transformer = function (time) {
return {
hour: ... (hour calculation),
minutes: ... (minutes calculation)
}
}
Is there something I don't see?
EDIT:
Fiddle to reproduce
https://jsfiddle.net/9coywzgt/5/
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 319
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from a8m/angular-filter
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
a8m/angular-filter#267 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
a8m/angular-filter#260 · 1 reaction ·
-
KiB and MiB are wrongly used in place of kB and MBPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
a8m/angular-filter#254 · 2 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
a8m/angular-filter#250 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
a8m/angular-filter#208 · 1 comment · 1 reaction ·
All issues in a8m/angular-filter
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
solana-foundation/solana-com#2245 ·
Maintainers usually reply within 1 day
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
TAMULib/fw-registry#543 ·
Maintainers usually reply within 1 day
-
security
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
No LICENSE file shipped with the v4.7.0 release (OFL-1.1 / MIT split undocumented in-repo)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
FortAwesome/Font-Awesome#21688 ·