The ultimate way to interact with RESTFull backends from javascript clients.
You can install this package with bower.
bower install datasourcejsImport the js library to your page:
<script src="bower-components/datasourcejs/dist/datasource.js"></script>Then you can use datasource diretive to handle RESTFull requests:
<datasource
name="Users"
entity="http://jsonplaceholder.typicode.com/users"
keys="id"
rows-per-page="-1">
</datasource>The datasource diretive will handle the following actions
| Request | Url |
|---|---|
| GET | /entity |
| POST | /entity |
| PUT | /entity/{ID} |
| DELETE | /entity{ID} |
- Support for secure requests
- Unit test case