You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

angular-barcode

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-barcode - npm Package Compare versions

Comparing version

to
2.0.0

2

package.json
{
"name": "angular-barcode",
"version": "1.4.2",
"version": "2.0.0",
"description": "An angular directive for lindell's JsBarcode",

@@ -5,0 +5,0 @@ "main": "dist/angular-barcode.js",

# angular-barcode
[NPM registry](https://www.npmjs.com/package/angular-barcode)
An angular directive for [Lindell's JsBarcode](https://github.com/lindell/JsBarcode)

@@ -11,10 +13,6 @@

#### Install with JSPM
#### Import
```jspm install npm:angular-barcode```
#### Import (if using JSPM)
```javascript
import barcode from 'angular-barcode';
import 'angular-barcode';
```

@@ -25,3 +23,3 @@

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

@@ -32,3 +30,3 @@

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

@@ -41,12 +39,42 @@

```html
<barcode bc-text="Hello World!" bc-type="svg" bc-format="CODE128" bc-line-color="#000000"
bc-width="2" bc-height="100" bc-display-value="true" bc-font-options=""
bc-font="monospace" bc-text-align="center" bc-text-position="bottom"
bc-text-margin="2" bc-font-size="20" bc-background="#ffffff" bc-margin="0" bc-marginTop="undefined"
bc-marginBottom="undefined" bc-marginLeft="undefined" bc-marginRight="undefined">
</barcode>
<angular-barcode ng-model="txt" bc-options="bc" bc-class="barcode" bc-type="svg"></angular-barcode>
```
Do not forget the closing tag `</barcode>` if you intend to generate SVGs.
or
```html
<angular-barcode ng-model="txt" bc-options="bc" bc-class="barcode" bc-type="img"></angular-barcode>
```
or
```html
<angular-barcode ng-model="txt" bc-options="bc" bc-class="barcode" bc-type="canvas"></angular-barcode>
```
with $scope.bc:
```javascript
$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.

@@ -58,6 +86,2 @@

This package is written in ES2015 and uses browserify and babelify.
For versions older than 1.2.5:
You will need to setup the canvas package manually: https://www.npmjs.com/package/canvas
This package is written in ES2015 and uses webpack for bundling.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet