Fixed issue-45.
Fixed typo in issue-44.
Fixed reopened issue.
Deleted unnecessary customPage
validations.
Fixed issue.
Fixed issue.
Fixed issue.
Added initialization NgxHateoasClientConfigurationService
to root module constructor that allows using NgxHateoasClientModule.forRoot()
in test classes.
Added testing documentation.
Fixed issue.
Updated to Angular 13.
This version supports only from Angular 12 and above that uses
Ivy compilation
.Angular 13 package tools are no longer support old
View Engine
compilation. Now it uses onlyIvy
compilation.
Now the lib
have 2 versions for Angular 6-11
2.x.x and Angular 12-13+
3.x.x that difference between that one is support old View Engine
compilation, another uses only new Ivy
compilation.
Versions that support old View Engine
compilation will place on ng-ve branch of the repo.
I strongly recommend migrating to Angular Ivy compilation and use new lib version, because support two versions is not simple and in future old versions can not be supported.
Updated Angular to 12 version.
Resolved issue.
-
RequestOption
changes:Added new params to RequestOption:
headers?: HttpHeaders | {[header: string]: string | string[];}; reportProgress?: boolean; withCredentials?: boolean;
Now
RequestOption
is base options for all resource requests. It is contains all usefully params from AngularHttpClient
. -
GetOption
changes:Now
GetOption
extendsRequestOption
that means you can passRequestOption
params withinGetOption
. -
HateoasResourceService
changes:To
createResource
added optional param:options?: RequestOption
To
updateResource
added optional param:options?: RequestOption
To
updateResourceById
added optional param:options?: RequestOption
To
patchResource
added optional param:options?: RequestOption
To
patchResourceById
added optional param:options?: RequestOption
Added hasRelation()
function to Resource
class to check has or not resource some link.
For more information see pull request.
Changed determination resource type algorithm.
Now:
ResourceCollection
can contain only two props _embedded
and _links
.
PagedResourceCollection
can contain three props _embedded
, _links
, and page
.
Resource
can contain additional _embedded
property.
Release 2.0.0 version
Updated peer dependencies
- Changed system that creates resource class from the server-side response. Before was used the standard
Resource
orEmbeddedResource
classes respectively, now used concrete resource type class. - Changed subtype support see new subtype system more here.
- Added @HateoasResource, @HateoasEmbeddedResource, @HateoasProjection, @ProjectionRel decorators.
- Added new resource projection support. See more about it here.
- Deleted
Resource.isResourceOf
method, now you can use standardinstanceof
statement. HateoasResourceService
changed the first param fromresourceName
toresourceType
.HateoasResourceOperation
constructor param changed fromresourceName
toresourceType
.- Added
warn
logging level. - Documentation and migration-guide changed.
bindRelation
now accepts entity and an array of entitiesclearCollectionRelation
renamed tounbindCollectionRelation
README.md was updated.
Deleted Resource
methods:
updateResource
Changed Resource
methods:
addRelation
was renamed toaddCollectionRelation
bindRelation
changed signature method now it accepts an array of entities instead single entity.
Added Resource
methods:
unbindResource
a new method that used with single resource relations to delete bound relations.
README.md was updated.
Updated Angular to 11 version.