0.0.2 • Published 6 years ago

ngx-wechat-qrcode v0.0.2

Weekly downloads
8
License
-
Repository
-
Last release
6 years ago

What

this is an angular component to generate qrcode for wechat, it also use in login that use wechat to your site

How to use

install

install: npm install ngx-wechat-qrcode --save

import

@NgModule({
  imports: [
    NgxWechatQrcodeModule 
  ],
  declarations: [
    ...
  ],
  exports: [
    ...
  ],
})

use in template

<ngx-wechat-qrcode [width]="'300'" [height]="'400'" [config]="wechatConfig"></ngx-wechat-qrcode>

use in ts

  wechatConfig:WechatConfig;
  
  wechatInit(): void {
    this.wechatConfig = new WechatConfig(false, 'qrcode_wechat', environment.Wechat.appid, environment.Wechat.redirect_url, null, 'black', null);
  }
  

WechatConfig

see wechat api

    self_redirect: boolean;
    id: string;
    appid: string;
    scope: string;
    redirect_uri: string;
    state: any;
    style: 'black' | 'white';
    href: string;
    constructor(self_redirect: boolean, id: string, appid: string, redirect_uri: string, state: any, style: "black" | "white", href: string);
    getUrl(): string;
0.0.2

6 years ago

0.0.1

6 years ago