Skip to content
An angular directive for lindell's JsBarcode
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Improved Codestyle Mar 24, 2017
dist Bugfix Jan 21, 2017
example Updated documentation, deprecated versions 1.4.*, published version 2… Jan 24, 2017
src Improved Codestyle Mar 24, 2017
.eslintrc.json Improved Codestyle Mar 24, 2017
.gitignore Fixes and cleanup Jul 16, 2016
LICENSE Update LICENSE Mar 25, 2017 Update Mar 24, 2017
bower.json Updated bower.json ignored files Mar 24, 2017
karma.conf.js Improved Codestyle Mar 24, 2017
package.json Updated bower.json ignored files Mar 24, 2017
spec.bundle.js Improved Codestyle Mar 24, 2017
webpack.config.babel.js Improved Codestyle Mar 24, 2017

angular-barcode npmlicenceCodacy grade

Check out the demo!

NPM registry

An angular directive for Lindell's JsBarcode


Install with NPM

npm install --save angular-barcode


import 'angular-barcode';

Or include the script in your code

<script src="node_modules/angular-barcode/dist/angular-barcode.js"></script>

Add it as a module to angular

angular.module('MyExampleApp', ['angular-barcode']);


Default values:

<angular-barcode ng-model="txt" bc-options="bc" bc-class="barcode" bc-type="svg"></angular-barcode>


<angular-barcode ng-model="txt" bc-options="bc" bc-class="barcode" bc-type="img"></angular-barcode>


<angular-barcode ng-model="txt" bc-options="bc" bc-class="barcode" bc-type="canvas"></angular-barcode>

with $scope.bc:

$scope.bc = {
    format: 'CODE128',
    lineColor: '#000000',
    width: 2,
    height: 100,
    displayValue: true,
    fontOptions: '',
    font: 'monospace',
    textAlign: 'center',
    textPosition: 'bottom',
    textMargin: 2,
    fontSize: 20,
    background: '#ffffff',
    margin: 0,
    marginTop: undefined,
    marginBottom: undefined,
    marginLeft: undefined,
    marginRight: undefined,
    valid: function (valid) {

-Take a look at the example/index.html file.

For more details you should definitely check out JSBarcode's Wiki!

Dev / Other

This package is written in ES2015 and uses webpack for bundling.

You can’t perform that action at this time.