I have this plunker
http://plnkr.co/edit/ml1Eqvz5pZY1MgxX87s7?p=preview
i am trying to query the .json file with no success. here is my factory
app.factory('myService', function($http, $q) {
return {
getFoo: function() {
var deferred = $q.defer();
$http({ url: 'foo.json',
method : "GET",
params : { 'item.id' : 0 } })
.success(function(data) {
deferred.resolve(data);
}).error(function(){
deferred.reject();
});
return deferred.promise;
},
}
});
it works well but it doesn't get only the id:0. I want not to load all data from the .json file. I want to load only what's in id:0
any pointers?
thank you