Skip to content

An angular component for Angular 4+ for creating 1-D barcodes based on Lindell's JsBarcode

Notifications You must be signed in to change notification settings

janssen92/ngx-barcode

This branch is up to date with yobryon/ngx-barcode:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

59c3c41 · Jul 21, 2020

History

50 Commits
Jul 21, 2020
Jul 21, 2020
Jul 21, 2020
Apr 25, 2017
Apr 25, 2017
Apr 25, 2017
Apr 25, 2017
Apr 25, 2017
Jul 24, 2017
Jul 21, 2020
Jul 21, 2020
Jun 24, 2017
Apr 25, 2017
Jul 21, 2020

Repository files navigation

ngx-barcode

ngx-barcode

A barcode component for Angular4+.


An angular component for Angular 4+ for creating 1-D barcodes based on Lindell's JsBarcode.

Demo

Basic demo.

Features

  • supports all barcode formats provided by JsBarcode
    • CODE128
    • EAN
    • CODE39
    • ITF-14
    • MSI
    • Pharmacode
    • Codabar

Installation

To use ngx-barcode in your project, install it via npm:

$ npm install ngx-barcode --save

Usage

Import the NgxBarcodeModule into your desired module:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import ngx-barcode module
import { NgxBarcodeModule } from 'ngx-barcode';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgxBarcodeModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once the library is imported, you can use the ngx-barcode component in your Angular application:

<!-- Adding a barcode in app.component.html -->
<h1>
  {{title}}
</h1>
<ngx-barcode [bc-value]="value" [bc-display-value]="true"></ngx-barcode>

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

MIT © Bryon Williams

About

An angular component for Angular 4+ for creating 1-D barcodes based on Lindell's JsBarcode

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 71.0%
  • TypeScript 29.0%