title: Advanced AngularJS custom filtering on ngRepeat objects
body: <p>I want to achieve the following theoretical code:</p>
  
  <p>VIEW.html</p>
  
  <pre><code>&lt;li ng-repeat="player in players | filter:myCustomFilter(player)"&gt;{{player.name}}
  </code></pre>
  
  <p>CONTROLLER.js</p>
  
  <pre><code>// some theoretical conditional statement that return a boolean
  $scope.otherCondition = true;
  
  
  $scope.myCustomFilter = function(player) {
      return player.name.substring(0,1).match(/A/gi) &amp;&amp; $scope.otherCondition;
  }
  </code></pre>
  
  <p>So I want all of my players to be loaded into an Angular model, but I only want to render players into the DOM whose names start with the letter 'A'. When I try and do something like this, my console informs me that <code>player</code> is undefined. Do I need to write a custom filter in order to achieve this (via <code>angular.module().filter()</code>)?</p>