I have factory, that send request to get some data. After responce, i will receive it in controller and create scope list. Than i must to filter this list by checking checkboxes. I'v receive results, but they not visible. Help me pls...
$scope.$watch("filterRoom", function(newval, oldval) {
var showAllCheckbox = true;
$scope.filteredRooms = [];
for (var j in $scope.apps) {
var p = $scope.apps[j];
for (var i in $scope.filterRoom) {
if ($scope.filterRoom[i]) {
if (i == p.rooms) {
$scope.filteredRooms.push(p);
break;
}
}
}
};
}, true);
Here is fiddle
Aucun commentaire:
Enregistrer un commentaire