I have a JSON link where I have to do searches:
http://www.liverpool.com.mx/tienda?s=xbox&d3106047a194921c01969dfdec083925=json
but I need to change the search criteria, for example to search xbox
or something else would change this:
www.liverpool.com.mx/tienda?s=[criterio]& d3106047a194921c01969dfdec083925=json
^^^^^^^^^^
This is the code I have:
angular.module("liverpoolapp",["ngStorage"])
.controller("primerControlador",function($scope,$http,$localStorage) {
$scope.posts = [];
$http.get("http://www.liverpool.com.mx/tienda?s=xbox&d3106047a194921c01969dfdec083925=json")
.success(function(data){
console.log(data);
$scope.posts = data;
})
.error(function(err){
});
$scope.grabar = function(){
$localStorage.busqueda = $scope.busqueda;
}
});