Angular 1.X Filter by Properties

Filtering By Nest Property
  $scope.list = [
    { 'Name': 'A',
      'Manager': {
        'Name': 'X'
    { 'Name': 'B',
      'Manager': {
        'Name': 'X'
    { 'Name': 'C',
      'Manager': {
        'Name': 'Y'

      <li ng-repeat="e in list | filter: {Manager: {Name: filter.key}}">
        {{e.Name}}  (Manager: {{e.Manager.Name}})

Filter not equals

<li class="list-group-item"
    ng-repeat="question in Questions | filter:{ Id: '!-1'}">
    <div href="#" editable-text="question.Text">{{question.Text}}</div>

How to get key of the object? (not in the view)

The first parameter to the iterator in forEach is the value and second is the key of the object.
angular.forEach(objectToIterate, function(value, key) {
    /* do something for all key: value pairs */
In your example, the outer forEach is actually:
angular.forEach($scope.filters, function(filterObj , filterKey)
Example of GroupBy and Unique

<tr class="ng-cloak" ng-repeat="(key, value) in bl.notelist | groupBy: 'email'">
     <td><span class="ng-cloak" ng-bind="value[0].email"></span></td>
     <td ng-repeat="player in value | unique:'appName'">
         <label class="ng-cloak switch" title="{{player.appName}}">
             <input type="checkbox" ng-checked="player.hasAccess" ng-disabled="!player.canModify">


Popular posts from this blog

Ng-repeat: Order a List Vertically rather Horizontal

NPOI Does Not Support CSV

Updating Razor 2.0 to 3.0 with MVC