Hacker News new | ask | show | jobs
by ludwigvan 4752 days ago
I haven't used either, I have used only $http so far but I have observed two important differences:

- Support for wrapped responses: ngResource expects that you return an array for GET, so you need to return [objects]. See https://github.com/mgonto/restangular#my-response-is-actuall...

So, if you return something like `{meta: ..., data: [objects]}`, you are out of luck. Does anyone know a work around for ng-resource? I am using tastypie server-side which returns wrapped responses.

- restangular uses promises for callback, so you can do foo.get().success(function (){}) just like $http, while ng-resource uses jquery like foo.get(function () {})