<button ng-click="erweima()">
扫描二维码
$inject = ['$scope'];
function erweimaCtrl($scope) {
//
二维码
$scope.erweima = ()=>
function(result) {
//扫码成功后执行的回调函数
alert("收到一个
二维码
("Scanning failed: " + error);
}, {
preferFrontCamera: true, //
iOS
with the torch switched on (if available)打开手电筒
prompt: "在
扫描区域内放置
二维码", // Android