title: how to create a filter to filter ng-model value in AngularJS?
body: <p>I have a input field: </p>
  
  <pre><code>&lt;input type="text" ng-model="defaultValue"&gt;
  </code></pre>
  
  <p>In my controller it is a empty string: </p>
  
  <pre><code>$scope.defaultValue = "";
  </code></pre>
  
  <p>I want to create a filter to compare the value in an object like:</p>
  
  <pre><code>   items: [
      {
      repo_status: null,
      cyberridge_loan_number: "FH00-0012-0003-0012",
      repo_id: 18,
      cr_loan_status: "CLOSED",
      eff_days_delinquent: null,
      principal_balance: null,
      preemptive_charge_off_balance: 0,
      total_final_charge_off_balance: 0
      },
      ...
  ]
  </code></pre>
  
  <p>for example: compare if the repo_id > 18? I have created a ng-repeat: </p>
  
  <pre><code>&lt;li ng-repeat="(key, value) in data.items[0]"&gt;{{value}}&lt;/li&gt;
  </code></pre>
  
  <p>(because this ng-repeat is for all same format api, I used {key, value} pair)</p>
  
  <p>But how to make a logic filter like (repo_id > 18 ?) and apply to ng-repeat?</p>
  
  <p>Thank you so much!</p>