Hello,
when i use
Customer = $resource('../bons.json')
$scope.posts = Customer.get()
i get this error, but i think the answer from server is Json objects as you
may see in the picture:
Error: $resource:badcfg
Response does not match configured parameter
<https://lh3.googleusercontent.com/-7GAyDkptOiM/VlbaXSHyM3I/AAAAAAAAABE/lPwvr_Gt54Y/s1600/angu2.jpg>
Error in resource configuration for action `object`. Expected response to
contain an array but got an {2} (Request: {3} {4})
when i use the following code everything is fine:
#$http(
#method : 'GET',
#url : '../bons.json'
#).success (data) ->
#$scope.posts = data
Any idea why?
--
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/d/optout.