vendredi 13 mai 2016

checkbox filtering on table with objects

I'm using AngularJS with smart-table module and I display a table with it.

The informations in rows are catched by "POST" request with MySQL.

These informations are stacked in a $scope.data_server declared in the app controller :

app.controller('SearchbddCtrl', function ($scope, $http) {
   get_data();
function get_data() {
    var name = $scope.name;
    $http.post('/searchbdd', {name: name}).success(function (data, status, headers, config) {
        $scope.data_server = data;
    }).error(function (data, status) {
        alert("Connection Error");
     });
    }
});

In front-end I display them like this :

<tr ng-repeat="data in displayCollection" st-select-row="data" st-select-mode="single">
<td></td>
<td></td>
</tr>

What I want to do : Filter these rows with multiple checkbox. I need 10 checkboxes.

I don't really know how to do it.. Does anyone has any infos or code example ??




Aucun commentaire:

Enregistrer un commentaire