Socket
Book a DemoInstallSign in
Socket

@blinkmobile/angularjs-pending-queue

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blinkmobile/angularjs-pending-queue

Offline storage and auto retry of form submission for AngularJS

1.0.0-alpha.2
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

AngularJS Pending Queue npm

AngularJS 1.5+ module to save form data to the browser or device storage when there is no connectivity or a server error

Installation

npm i @blinkmobile/angularjs-pending-queue

Setup

  • Include dist/bm-angularjs-pending-queue.js or dist/bm-angularjs-pending-queue.min.js in your HTML or in your build step
  • Add bmPendingQueue as a dependency to your AngularJS web app
require('path/to/dist/bm-angularjs-pending-queue.min.js')
angular.module('myModule', ['bmPendingQueue'])

Injectables

  • pendingQueueList - Component that displays the items saved in the pending queue
  • bmPendingQueueService - Service that wraps LocalForage to save data to the device in a specific format. Broadcasts events on $rootScope
  • dbName - Constant. The name of the device storage db being used
  • pendingQueueTable - Constant. The name of the table in the db

How it works

AngularJS Pending Queue works by injecting a HTTP Interceptor into the interceptors array. If a POST or PUT request with a Content Type header of application/x-www-form-urlencoded or application/json errors, the request and response data is saved to the device storage using LocalForage. If a previously saved item is successfully sent, the corresponding entry in device storage is removed.

There is a decorator for the $http service, to automate resending of items in the pending queue. Any successful HTTP request will trigger resending of any items in the pending queue.

See the docs folder for more details

Keywords

$http

FAQs

Package last updated on 18 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.