欢迎关注github:https://github.com/myopenresources
angular版 二维码组件cc-qrcode
安装
npm install cc-qrcode --save 或 yarn add cc-qrcode
使用
// 业务模块
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { QrcodeModule } from 'cc-qrcode';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
QrcodeModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
//业务html
<div>
<cc-qrcode [value]="'123456789'"></cc-qrcode>
</div>