This is project is a data layer for angular2. It's still early times, but comes with an example project based on the Heroes tutorial from the angular2 documentation.
npm install angular2-data
You'll need to create a Store which you can inject into a component or service. Use the StoreConfig to set the baseURL.
The constructor is required so that the store is injected with an Http service.
To use a store, you'll need a model:
You can then retrieve and create models.
this.store.queryThing.subscribe;this.store.findThing, 1.subscribe;this.store.createnew Thing.subscribe;
- Tests (thank to angular2-testing, jasmine, and rollup!)
- jsonapi support
- Identity cache
- server sent updates