LoginSignup
2
1

More than 3 years have passed since last update.

Ionic+AnglerJSでQRコード生成するモジュール使い比べ感想

Posted at

Ionic+AnglerJSでQRコード生成するモジュール使い比べ感想

いろいろ合って迷ったのでグーグルで検索で出てきたやつを使い比べ
基本的にTypeScriptで動作するもの。
ngx-kujaはQR読み込みでQR生成はこれあるよに入っていたので

名称 git
angular2-qrcode https://github.com/SuperiorJT/angular2-qrcode
angularx-qrcode https://github.com/cordobo/angularx-qrcode
ng-qrcode https://github.com/mnahkies/ng-qrcode
ngx-kjua https://github.com/werthdavid/ngx-kjua

開発環境

Ionicスタートで作成したプロジェクトで実行

Ionic start

反映方法は、モジュールへの追記とHTMLへのタグ追加のみで、GitHubのREADMEで分かりやすかったので、個人の感想などがメインです。

個別ごとに気になった点

angular2-qrcode

気になった点
paddinggaが設定できるのが、意外と便利になる可能性が。。。?

angularx-qrcode

気になった点
HTMLでプロパティ引数で文字はシングルコーテーション('')囲いが必要なところ?

<qrcode [qrdata]="'Your QR code data string'" [size]="256" [level]="'M'" [usesvg]="true"></qrcode>

ng-qrcode

NoName_2019-11-15_10-3-43_No-00.png
気になった点
QRなどへの色指定がなさそう?

ngx-kjua

NoName_2019-11-15_10-3-57_No-00.png

気になった点
いろいろできすぎるですね。。
HTMLでプロパティ引数で文字はシングルコーテーション('')囲いが必要なところ?

<ngx-kjua [text]="'Your QR code data string'"></ngx-kjua>

書き出しに違いがあるのが大きな差

名称 PNG Canvas SVG Image on Code Image as Code
angular2-qrcode
angularx-qrcode
ng-qrcode
ngx-kjua

結果

書き出しの画像が何を使いたいかで、棲み分けが良さそう。
QRにIMG埋め込んで華やかさ?出したいかもだから、kuja使ってみようと検討

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1