Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

using Filter Inside a controller

Open
#150 2 comments 0 reactions 0 assignees View on GitHub

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

  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.

More from a8m/angular-filter

All issues in a8m/angular-filter

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.