Save Angular JS $http requests when you are offline, and execute when you are online
Example usage:
var module = angular.module('myModule', ['ngSync']);
module.config(['$httpProvider', '$syncProvider', function($httpProvider, $syncProvider)
{
$httpProvider.interceptors.push('SyncInterceptor');
$syncProvider.options({
urlRoot: 'http://api.mydomain.com/v1/' // empty for all urls
// other configs
});
}]);
Enter the following commands in the terminal
$ git clone https://github.com/munir7/ngSync.git
$ cd ngSync
$ npm install
$ gulp
-
Must have Git installed
-
Must have node.js (at least v0.10.0) installed with npm (Node Package Manager)
-
Must have Gulp node package installed globally
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D