https://www.npmjs.com/package/ngx-barcode
https://yobryon.github.io/ngx-barcode/demo/
ngx-barcode
A barcode component for Angular4+.
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:

{{title}}

Development

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

$ npm run build

To lint all *.ts files:

$ npm run lint在这里插入图片描述

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐