AngularJS service that persists and retries a queue of promise-based asynchronous function calls to HTML5 storage