main
 1import QRCode from 'qrcode';
 2import ApplicationController from '../application_controller';
 3
 4export default class extends ApplicationController {
 5  get secret() { return this.targets.find('secret'); }
 6
 7  get canvas() { return this.targets.find('canvas'); }
 8
 9  connect() {
10    QRCode.toCanvas(this.canvas, this.secret.value, (error) => {
11      if (error) super.log(error);
12    });
13  }
14}