AngularJS implements fuzzy filtering query

<form class="form-horizontal">
        <div class="form-bottom col-xs-6">
          <span class="font-weight">EID</span>
          <div class="input-div">
            <input type="text" placeholder="EID" ng-model="eid" class="demo-input" ng-keyup="searchRecords($event)">   
          </div>
          <button class="btn btn-primary" ng-click="searchEID()">Query</button>
        </div>
        <div class="form-bottom col-xs-6">
            <!-- <span>Contry</span>
            <div class="input-div">
              <input type="text" placeholder="Please select the month" class="demo-input input_field_madoka">
              
            </div> -->
          </div>
      </form>
      <table class="table table-striped">
        <thead>
          <tr>
            <th>Contry</th>
            <th>City</th>
            <th>Department</th>
            <th>EID</th>
            <th>Start Time</th>
            <th>Session Length</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="record in record.historyRcords | filter:eid" ng-click="openDetail(record.id)">
            <td>{{record.Country}}</td>
            <td>{{record.Location}}</td>
            <td>{{record.Entity}}</td>
            <td>{{record.eid}}</td>
            <td>{{record.last_date}}</td>
            <td>{{record.datelen}}s</td>
          </tr>
        </tbody>
      </table>
      <tm-pagination conf="paginationRcords"></tm-pagination>

  The ng-model and filter of the input box can match (the database will not be queried, only the data displayed on the page will be searched)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324772140&siteId=291194637