Restangular
Restangular is an AngularJS service that simplifies common GET, POST, DELETE, and UPDATE requests with a minimum of client code. It's a perfect fit for any WebApp that consumes data from a RESTful API.
Check out a, live demo on plunkr. It uses the same example as the official Angular Javascript Project... but Restangularized!
You can also check out a video introduction of a talk I gave at Devoxx France about Restangular
目录
- Restangular
- Differences with $resource
- How do I add this to my project?
- Dependencies
- Production apps using Restangular
- Starter Guide
- Quick configuration for Lazy Readers
- Adding dependency to Restangular module in your app
- Using Restangular
- Configuring Restangular
- Properties
- setBaseUrl
- setExtraFields
- setParentless
- setDefaultHttpFields
- addElementTransformer
- setOnElemRestangularized
- setResponseInterceptor
- setResponseExtractor (alias of setResponseInterceptor)
- addResponseInterceptor
- setRequestInterceptor
- addRequestInterceptor
- setFullRequestInterceptor
- setErrorInterceptor
- setRestangularFields
- setMethodOverriders
- setDefaultRequestParams
- setFullResponse
- setDefaultHeaders
- setRequestSuffix
- setUseCannonicalId
- How to configure them globally
- How to create a Restangular service with a different configuration from the global one
- Decoupled Restangular Service
- Properties
- Methods description
- Copying elements
- Enhanced promises
- [Using values directly in templates](#using-values-directly-in-templates)
- Using Self reference resources
- URL Building
- Creating new Restangular Methods
- Adding Custom Methods to Collections
- Adding Custom Methods to Models
- FAQ
- How can I handle errors?
- I need to send one header in EVERY Restangular request, how do I do this?
- Can I cache requests?
- Can it be used in $routeProvider.resolve?
- My response is actually wrapped with some metadata. How do I get the data in that case?
- I use Mongo and the ID of the elements is _id not id as the default. Therefore requests are sent to undefined routes
- What if each of my models has a different ID name like CustomerID for Customer
- How do I handle CRUD operations in a List returned by Restangular?
- When I set baseUrl with a port, it's stripped out.
- How can I access the unrestangularized element as well as the restangularized one?
- Restangular fails with status code 0
- Why does this depend on Lodash / Underscore?
- Supported Angular versions
- Server Frameworks
- Releases Notes
- License