angular-jsv
Version:
JSV (JSON+CSV) httpParamSerializer for AngularJS
44 lines (35 loc) • 990 B
Markdown
JSV (JSON+CSV) httpParamSerializer for AngularJS
```bash
npm install angular-jsv
```
or
```bash
yarn install angular-jsv
```
or
```bash
bower install angular-jsv
```
When you are done downloading all the dependencies and project files the only remaining part is to add dependencies on the `JSV` AngularJS module:
```js
angular.module('myModule', ['JSV']);
```
Pass `JsvHttpParamSerializer` as paramSerializer in your $http service call.
```js
// Simple GET request example:
$http({
method: 'GET',
url: '/someUrl',
paramSerializer: 'JsvHttpParamSerializer'
}).then(function successCallback(response) {
// this callback will be called asynchronously
// when the response is available
}, function errorCallback(response) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});
```