- Notifications
You must be signed in to change notification settings - Fork2
Simple Angular 2+ barcode scanner
License
neojato/ngx-barcode-input
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This module contains an Angular input box component with a button that allows to scan a barcode when viewed from a mobile device (ex Android/iOS), which then records the scanned string of data into the input field for form submission.
- The component has minimal styling
- There is no need to include a component-specific external stylesheet
- As the input component takes a plain input and projects it, this means that by design the component supports all standard HTML input attributes, including custom attributes (data-), all the accessiblity properties, etc.
- This also means that these components are compatible with Angular Forms
- This repo is designed as a library in theAngular Package Format v4.0.
- This means that this module is compatible with AOT, and includes UMD bundles for use with SystemJs
- This Angular component extends theQuaggaJS barcode library
https://ngxbarcodeinput.firebaseapp.com/
This is how to install the components:
npm install ngx-barcode-input
or
yarn add ngx-barcode-input
And on your application module:
import{NgxBarcodeInputModule}from'ngx-barcode-input';@NgModule({declarations:[ ...],imports:[BrowserModule, ....,NgxBarcodeInputModule],})exportclassAppModule{}
See below for SystemJs / UMD installation.
Use the Barcode Input like this:
<divclass="form-row"><label>Barcode Input:</label><ngx-barcode-input></ngx-barcode-input></div>
This command will build and start the demo application:
npm start
These commands will build, package, and deploy for NPM
npm run buildnpm run packagrnpm publish dist
The tests can be executed with the following commands:
npmtestnpm integration
Make sure to add this to yourmap
configuration, if you need the module served from a CDN:
map:{ ...'ngx-barcode-input':'https://unpkg.com/ngx-barcode-input@<version number>/ngx-barcode-input.umd.min.js'}
Otherwise if serving fromnode_modules
directly:
map:{ ...'ngx-barcode-input':'node_modules/ngx-barcode-input/bundles/ngx-barcode-input.umd.min.js'}
And in our packages property:
packages:{ ...'ngx-barcode-input':{main:'index.js',defaultExtension:'js'}}
About
Simple Angular 2+ barcode scanner
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.