An ember wrapper of qrcode.js, a tool to generate QR Code on client side.
- Ember.js v2.18 or above
- Ember CLI v2.13 or above
- Node.js v8 or above
ember install ember-qrcode-shim
npm run lint:js
npm run lint:js -- --fix
ember test
– Runs the test suite on the current Ember versionember test --server
– Runs the test suite in "watch mode"ember try:each
– Runs the test suite against multiple Ember versions
ember serve
- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
Example
{{qr-code text="http://www.example.com" colorLight="#F7F7F7" width=155 height=155 correctLevel="L"}}
Config arguments provided by qrcode.js are also provided as component attributes with same key names. They are
text
- the target text that the QR code represents forwidth
- the QR image widthheight
- the QR image heightcolorDark
- color of dark blockscolorLight
- color of light backgroundcorrectLevel
- L | M | Q | H
You can also import qrcode.js as an ES6 module, so that you can have full control of rendering the QR Code as you wish.
import QRCode from 'qrcode';
...
See the Contributing guide for details.
This project is licensed under the MIT License.