|
1 | 1 | # Angular 2 JSON API |
2 | 2 |
|
3 | | -A lightweight Angular 2 adapter for [JSON API](http://jsonapi.org/) |
| 3 | +Fork of [angular2-jsonapi](https://github.com/ghidoz/angular2-jsonapi) |
4 | 4 |
|
5 | | -[](https://travis-ci.org/ghidoz/angular2-jsonapi) |
6 | | -[](https://coveralls.io/github/ghidoz/angular2-jsonapi?branch=master) |
7 | | -[](https://angular.io/styleguide) |
8 | | -[](https://david-dm.org/ghidoz/angular2-jsonapi) |
9 | | -[](https://david-dm.org/ghidoz/angular2-jsonapi#info=devDependencies) |
10 | | -[](https://badge.fury.io/js/angular2-jsonapi) |
| 5 | +A lightweight Angular 2 adapter for [JSON API](http://jsonapi.org/) |
11 | 6 |
|
12 | 7 | ## Table of Contents |
13 | 8 | - [Introduction](#Introduction) |
@@ -62,12 +57,12 @@ Moreover, using Angular2 and Typescript, we like to interact with classes and mo |
62 | 57 |
|
63 | 58 | To install this library, run: |
64 | 59 | ```bash |
65 | | -$ npm install angular2-jsonapi --save |
| 60 | +$ npm install @michalkotas/angular2-jsonapi --save |
66 | 61 | ``` |
67 | 62 |
|
68 | 63 | Add the `JsonApiModule` to your app module imports: |
69 | 64 | ```typescript |
70 | | -import { JsonApiModule } from 'angular2-jsonapi'; |
| 65 | +import { JsonApiModule } from '@michalkotas/angular2-jsonapi'; |
71 | 66 |
|
72 | 67 | @NgModule({ |
73 | 68 | imports: [ |
@@ -115,7 +110,7 @@ Firstly, create your `Datastore` service: |
115 | 110 | - Pass the `HttpClient` depencency to the parent constructor. |
116 | 111 |
|
117 | 112 | ```typescript |
118 | | -import { JsonApiDatastoreConfig, JsonApiDatastore, DatastoreConfig } from 'angular2-jsonapi'; |
| 113 | +import { JsonApiDatastoreConfig, JsonApiDatastore, DatastoreConfig } from '@michalkotas/angular2-jsonapi'; |
119 | 114 |
|
120 | 115 | const config: DatastoreConfig = { |
121 | 116 | baseUrl: 'http://localhost:8000/v1/', |
@@ -145,7 +140,7 @@ Then set up your models: |
145 | 140 | - (optional) Define your [Metadata](#metadata) |
146 | 141 |
|
147 | 142 | ```typescript |
148 | | -import { JsonApiModelConfig, JsonApiModel, Attribute, HasMany, BelongsTo } from 'angular2-jsonapi'; |
| 143 | +import { JsonApiModelConfig, JsonApiModel, Attribute, HasMany, BelongsTo } from '@michalkotas/angular2-jsonapi'; |
149 | 144 |
|
150 | 145 | @JsonApiModelConfig({ |
151 | 146 | type: 'posts' |
@@ -527,7 +522,7 @@ Error handling is done in the `subscribe` method of the returned Observables. |
527 | 522 | If your server returns valid [JSON API Error Objects](http://jsonapi.org/format/#error-objects) you can access them in your onError method: |
528 | 523 |
|
529 | 524 | ```typescript |
530 | | -import {ErrorResponse} from "angular2-jsonapi"; |
| 525 | +import {ErrorResponse} from "@michalkotas/angular2-jsonapi"; |
531 | 526 |
|
532 | 527 | ... |
533 | 528 |
|
@@ -590,4 +585,4 @@ This library is inspired by the draft of [this never implemented library](https: |
590 | 585 |
|
591 | 586 | ## License |
592 | 587 |
|
593 | | -MIT © [Daniele Ghidoli](http://danieleghidoli.it) |
| 588 | +MIT |
0 commit comments