ng-hateoas-client
v2.6.9-0
Published
Access your rest-resources with well known methods
Downloads
6
Readme
ng-hateoas-client
Access your rest-resources with well known methods
Dependencies
- "@angular/*": "6.1.8",
- "immutable": "3.8.2",
- "rxjs": "6.3.2",
Install && usage
npm i --save ng-hateoas-client
Add dependencies in tsconfig.json
"lib" : ["es6", "dom"],
"baseUrl": ".",
"paths": {
"ng-hateoas-client": [
"./node_modules/ng-hateoas-client/rest"
]
},
Import por-ng-rest-component & LinkResponseService in you app
@NgModule({
imports: [ RestModule, ... ],
providers: [ LinkResponseService, .... ],
Testapp
Wind up this app in you favourite shells Kør opp appen med kommandoene (i to ulike shell) :
- npm run start /* static node-server providing the mock-files */
- npm run serve /* bundle and serve the test app on port 4422 */
See example app.component.ts to learn how to crate Link for initial call to server, and how to parse the response into different domain objects vith help of the DomainObject -class. The test app allso gives examples on how to use get('resource')-functions on a LinkResponse
Publish
This client use semver
$ npm version [semver-version]
$ git tag -a "vX.Y.Z"
$ git push --tags origin master
$ npm run prepublish
// Confirm that there is a _ng-hateoas-client-*.*.*.tgz_-file , with correct version number
$ cd dist/ng-hateoas-client
npm publish