Skip to content

Commit 4e96f91

Browse files
committed
fix: correct after remove module
1 parent d10aa56 commit 4e96f91

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# [18.0.1]
2+
3+
* Remove `providedIn` from `JsonApiDatastore` service (cause it's not needed)
4+
* Correct documentation
5+
16
# [18.0.0]
27

38
* Update to Angular 18

README.MD

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,11 @@ To install this library, run:
6565
$ npm install @michalkotas/angular2-jsonapi --save
6666
```
6767

68-
Add the `JsonApiModule` to your app module imports:
69-
```typescript
70-
import { JsonApiModule } from '@michalkotas/angular2-jsonapi';
71-
72-
@NgModule({
73-
imports: [
74-
BrowserModule,
75-
JsonApiModule
76-
],
77-
declarations: [
78-
AppComponent
79-
],
80-
bootstrap: [AppComponent]
81-
})
82-
export class AppModule { }
83-
```
68+
### Migrate to version 18+
69+
70+
Version 18 does not expose the module because it has been removed. Therefore, you need to remove all imports of the `JsonApiModule`.
71+
72+
Additionally, ensure that `HttpClientModule` is provided in your application, as it was previously imported and re-exported by `JsonApiModule`.
8473

8574
### Angular CLI configuration (for CLI 8.1+)
8675

projects/angular2-jsonapi/src/services/json-api-datastore.service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ export type ModelType<T extends JsonApiModel> = new(datastore: JsonApiDatastore,
2323
*/
2424
const AttributeMetadataIndex: string = AttributeMetadata as any;
2525

26-
@Injectable({
27-
providedIn: 'root'
28-
})
26+
@Injectable()
2927
export class JsonApiDatastore {
3028

3129
protected config: DatastoreConfig;

0 commit comments

Comments
 (0)