$http.get() doesn't take a config object. Try using $http() instead.

On Saturday, December 28, 2013 7:56:44 PM UTC-8, Adrian Ferreres wrote:
>
> Hello:
>
>  I have two examples of AngularJS code. This is the first:
>
>   $http.get("json/menuBar.json").success(function(data){
> $scope.barra = data;
> });
>
> and this is the second:
>
>   
> $http.get({method:'GET',url:'json/menuBar.json',cache:true,responseType:'json'}).success(function(data){
> $scope.barra = data;
> });
>
> The first works fine but the second gives a 404 error because the get 
> request is calling to an strange URL: 
> "/Angular%20web/%5Bobject%20Object%5D". 
> Does someone know where is my error?
>
> Thank you in advance
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to