Angular - Filter w/o a directive

filter will apply to all values in the data set not just those in the table

by Todd

HTML

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div data-ng-app="app">
  <div id="appWrapper" data-ng-cloak="" data-ng-controller="appCntrl">
  <input type="text" id="row-filter" data-ng-model="searchTerm" placeholder="search term" name="my-filter" />
    <div class="container">
      <table id="params-list" class="table table-hover table-striped">
        <thead>
          <tr>
            <th>Type</th>
            <th>Description</th>
            <th>Value</th>
            <th>Active?</th>
          </tr>
        </thead>
        <tbody>
          <tr data-ng-repeat="row in paramValues | filter:searchTerm" >
              <td>{{row.NAME}}</td><td>{{row.DESCR}}</td> <td>{{row.VALUE}}</td> 
              <td>{{row.ACTIVE}}</td> </tr>
        </tbody>
      </table>
    </div>

  </div>
</div>

JavaScript

var app = angular.module('app', []);

app.controller('appCntrl', ['$scope', function($scope) {
  $scope.searchTerm = "";
  $scope.paramValues = [{
    NAME: "PNAME1",
    VALUE: "PVALUE1",
    TYPE: "PTYPE1",
    ACTIVE: "YES",
    DESCR: "PDESCR1",
    INVISIBLE: "XXX"
  }, {
    NAME: "PNAME2",
    VALUE: "PVALUE2",
    TYPE: "PTYPE2",
    ACTIVE: "NO",
    DESCR: "PDESCR2",
    INVISIBLE: "ZZZ"
  }];

}]);