Ok Jeff you are right. I do not know how I could not see it. Thank you very much
2013/12/29 Jeff Hubbard <[email protected]> > $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 a topic in the > Google Groups "AngularJS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/cDmg9elBi5c/unsubscribe. > To unsubscribe from this group and all its topics, 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. > -- 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.
