using Filter Inside a controller
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- angularjs, javascript
- Domain
- frontend
Research direction
The issue is about using the 'unique' filter inside an AngularJS controller. The user shows it works in an HTML ng-repeat but fails when called via $filter in JavaScript. Look at the angular-filter library's source for the 'unique' filter implementation, likely in a file like lib/filters/unique.js. Test the filter's API in a controller context, checking the arguments it expects. Verify by creating a minimal test case in a controller to see the correct usage.
Written by the indexing model from the issue text.
Description
Hi,
How can we use this filters inside a angularjs controller. It works fine when I use it inside html with ng repeat
"data-ng-repeat="orders in orderList | unique: 'submission_Date'"
but when I try to use it inside my controller then it is not working properly
console.log($filter('unique')($scope.orderList ,$scope.orderList .submission_Date));
- 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 ·
-
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
-
automation models
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
needs:triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
enhancement status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
mastra-ai/mastra#25508 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 72/100
githubnext/gh-aw-cao#15017 ·
Maintainers usually reply within 1 day