- Updated bower and NPM distributions to fix invalid main reference for NPM package
- Added ability to abort requests - #213 (@saicheg)
- Support for polymorphic associations - #217 (@odedniv)
- Added afterDeserialize interceptor phase that runs after deserialization of every resource - #218 (@odedniv)
- Fixed AngularJS dependency from 1.0.x to 1.x.x - #200 (@shuhei)
- Fixed URL string interpolation to use
idAttributeconfig setting - #202 (@gannimet)
- Allow queryParams for $post, $put and $patch - #197 (@herumtreiber )
- Added option for singular resources - #187 (@jnfeinstein)
configurenow returns the config object. - #176 (@poporul)
- Renamed
Serializer.serializeValuetoSerializer.serializeDataand added newSerializer.serializeObjectmethod. - #149 (@andrey-abramow)
- Apply custom serialization attributes before doing full serialization - #148 (@envek)
- Add support for adding custom attributes when serializing arrays - #143 (@shuhei)
- Force constructor to unwrap as an object - #134 (@tuvistavie)
- Call beforeResponse interceptor only once - #139 (@shuhei)
- Added
unsnappedChanges()function to snapshots mixin to check whether or not there have been any changes since the last snapshot was taken. - #125 (@StevenClontz) - Added
skipRequestProcessingoverride configuration option to $http, $post, $put, $patch to bypass request processing (root wrapping, serialization) and request interceptor chains - #123 (@mayhewluke)
- Added
idAttributeconfiguration option to allow customizing the unique id field on resources. - #114 (@inlineblock) - Added
getinstance method to refresh resources from the server. - #115 (@wwilkins)
response.originalDatawas not being saved off before the root unwrapping so it didn't match the original response data as intended. @Ditchou
requestTransformers,responseInterceptors,afterResponseInterceptorshave been replaced with a singleinterceptorschain.beforeRequest- UseinterceptBeforeRequestWrappingbeforeResponse- UseinterceptResponseafterResponse- UseinterceptAfterResponse
- Added
configurefunction to allow changing configuration options after the resource has been initially configured. - Separated out RailsResource into separate service to allow subclassing without using the factories.
- Added mixin capability, see README for details
- Added snapshot and rollback extension, see README for details.
- Added
underscoreParamsconfiguration option to allow turning off parameter underscore renaming. - Added
fullResponseconfiguration option to allow returning the full $http response for promise resolution. - Added optional query params to class and instance $delete methods
railsResourceFactoryProvidersettings have been moved toRailsResourceProviderwrapDataconfig option has been renamedrootWrapping- All resource settings are now stored under the
configproperty on the resource and should be modified using theconfigurefunction. - The following resource settings have been renamed:
enableRootWrappingwas renamedrootWrappingrootNamewas renamednamerootPluralNamewas renamedpluralName
- Query parameters were not underscored previously. We are now underscoring parameters by default. The configuration option
underscoreParamscan be set to false to disable the renaming. - Replaced
railsRootWrappingTransformerandrailsRootWrappingInterceptorwithrailsRootWrapperthat has wrap & unwrap methods. This eliminates the need for using promises during resource construction to handle unwrapping data passed into the constructor. - Resource constructor no longer executes response interceptors. If you need to customize the constructor you should look at using subclassing instead.
processResponse,transformData,callInterceptorshave all been removed as part of rewriting the request / response handling.
requestTransformers,responseInterceptors,afterResponseInterceptorshave been replaced with a singleinterceptorschain.beforeRequest- UseinterceptBeforeRequestWrappingbeforeResponse- UseinterceptResponseafterResponse- UseinterceptAfterResponse
- Added
fullResponseconfiguration option to allow returning the full $http response for promise resolution. - Added optional query params to class and instance $delete methods
- Replaced
railsRootWrappingTransformerandrailsRootWrappingInterceptorwithrailsRootWrapperthat has wrap & unwrap methods. This eliminates the need for using promises during resource construction to handle unwrapping data passed into the constructor. - Resource constructor no longer executes response interceptors. If you need to customize the constructor you should look at using subclassing instead.
processResponse,transformData,callInterceptorshave all been removed as part of rewriting the request / response handling.
- Added mixin capability, see README for details
- Added snapshot and rollback extension, see README for details.
- Added
underscoreParamsconfiguration option to allow turning off parameter underscore renaming.
- Query parameters were not underscored previously. We are now underscoring parameters by default.
The configuration option
underscoreParamscan be set to false to disable the renaming.
- Support submitting array data (#85)
- Added
configurefunction to allow changing configuration options after the resource has been initially configured. - Separated out RailsResource into separate service to allow subclassing without using the factories.
railsResourceFactoryProvidersettings have been moved toRailsResourceProviderwrapDataconfig option has been renamedrootWrapping- All resource settings are now stored under the
configproperty on the resource and should be modified using theconfigurefunction. - The following resource settings have been renamed:
enableRootWrappingwas renamedrootWrappingrootNamewas renamednamerootPluralNamewas renamedpluralName
- Query parameters were not underscored previously. We are now underscoring parameters by default.
The configuration option
underscoreParamscan be set to false to disable the renaming. - Replaced
railsRootWrappingTransformerandrailsRootWrappingInterceptorwithrailsRootWrapperthat has wrap & unwrap methods. This eliminates the need for using promises during resource construction to handle unwrapping data passed into the constructor. - Resource constructor no longer executes response interceptors. If you need to customize the constructor you should look at using subclassing instead.
processResponse,transformData,callInterceptorshave all been removed as part of rewriting the request / response handling.
- Support submitting array data (#85)
- Fix mapped name behavior when using serializer default exclusion (#81)
- Issue #67 incorrect date deserialization led to errors constructing a new resource with a property that was type Date
- Added updateMethod configuration option to railsResourceFactory to specify what HTTP method should be used to perform the update action
- Exposed default configuration options for both railsResourceFactory and railsSerializer as provider configuration options.
- Added context property to before response interceptors to have access to the calling resource instance in the case of create/update/delete.
- Added after response interceptors to be able to define custom callbacks that execute on all resources after method completion.
- Removed default transformers and interceptors
- railsFieldRenamingTransformer and railsFieldRenamingInterceptor have been removed completely and replaced by the serializers
- railsRootWrappingTransformer/Interceptor are no longer configured by the transformers/interceptors configuration option and is instead
configured by the
wrapDataoption.
- Interceptors added using
beforeRequestare run before any deserialization so the fields names have not been camelized.
- Added serializers to replace old field renaming logic and to give users a lot more flexibility in customizing the (de)serialization process
- Added
rootWrappingconfiguration option to be able to turn off root wrapping instead - Added path option to
$urlmethods to make it easier to construct a nested url.
- New
saveinstance method added to resources
- Added beforeRequest and beforeResponse methods that wrap a given function as a transformer/interceptor to more easily add customizations
- Added setUrl method to allow reconfiguring a resource's url after creation
- Added $url instance method to more easily reference the instance's URL
- Added instance and class methods for generic HTTP operations of $get, $post, $put, $delete