top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the advantages of Restangular over $resource and $http?

0 votes
316 views
What are the advantages of Restangular over $resource and $http?
posted Nov 11, 2017 by Latha

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Restangular has several features that distinguish it from $resource:
1. It uses promises.
2. You can use this in $routeProvider.resolve
3. It doesn't have all those $resource bugs like trailing slashes, additional: in the URL, escaping information,
expecting only arrays for getting lists, etc.
4. It supports all HTTP methods.
5. It supports ETag out of the box.
6. It supports self-linking elements if you receive from the server some item that has a link to itself, you can
use that to query the server instead of writing the URL manually.
7. You don't have to create one $resource object per request.
8. You don't have to write or remember ANY URL like $resource. You just write the name of the resource
you want to fetch and that's it.
9. It supports nested RESTful resources.
10. Restangular lets you create your own methods.
11. Support for wrapped responses.

answer Nov 11, 2017 by Shivaranjini
...