Hello , I have been trying to solve this problem for days.
i’m trying to filter json data using checkbox , for example when i check more than one id , it shows the rest it’s data
.controller(‘compareModelsCtrl’,[’$scope’,’$http’, ‘$state’ ,’$location’,
function($scope, $http, $state,$location, filterFilter) {
$http.get(‘js/data.json’).success(function(data){
$scope.models = data;
$scope.whichmodel = $state.params.modelId;
//$scope.toggleStar = function(model){
// model.star = !model.star;
//}
});
$scope.goL = function () {
$state.go('tabsController.compareModels2');
};
$scope.order = {
};
$scope.format=function(){
$scope.modifiedOrder=[];
angular.forEach($scope.order, function(value, key) {
if(value){
$scope.modifiedOrder.push(parseInt(key));
}
});
}
<ion-checkbox ng-repeat="model in models | filter:query" ng-model="order[model.id]" ng-change="format()">{{model.model_number}}</ion-checkbox>
</ion-item>
current order : {{modifiedOrder}}
i found this code and i have trying to implement it http://blog.sodhanalibrary.com/2015/12/filter-json-data-with-check-boxes-using.html#.V9BCarl97VN
,any help , please