New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blinkmobile/angularjs-draft-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-draft-queue

Offline storage of draft form submissions for AngularJS

  • 1.0.0-alpha.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
3
Weekly downloads
 
Created
Source

AngularJS Draft Queue npm

A tiny wrapper around Angular LocalForage for Blink Forms to help with auto-saving form entries

Installation

npm i --save @blinkmobile/angularjs-draft-queue

Usage

Include the script in your build/minification process or directly in HTML:

<script src="/node_modules/@blinkmobile/angularjs-draft-queue/dist/bm-angularjs-draft-queue.js"></script>

then configure the draft queue to use a table in the bmDrafts local db

angular.module('forms', ['bmDraftQueue' /*... other deps */])
       .config(['draftQueueProvider', function (draftQueueProvider) {
          draftQueueProvider.config({appName: 'demoApp'})
       }])
angular.bootstrap(document, ['forms'])

Injectables

  • draftQueueList - Component that displays the items saved in the pending queue
  • bmDraftQueueService - Service that wraps LocalForage to save data to the device in a specific format. Broadcasts events on $rootScope

bmDraftQueueService (service)

How it works

AngularJS Draft 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 is successful, the corresponding entry in draft queue is removed.

Developing

Gulp is used for building the dist/ folder and running the karma tests.

For convenience, npm scripts have been setup to run Gulp

npm test - gulp test-single run npm run test-e2e - run protractor e2e tests npm run test-human - starts a local web server and opens a browser for human testing npm run build - create the dist/ folder with both unminified and minified files

Keywords

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc