Skip to content

Is there anyway to call the var resultDiv in ng-model? #29

@Manoj27893

Description

@Manoj27893

var resultDiv;

document.addEventListener("deviceready", init, false);
function init() {
document.querySelector("#startScan").addEventListener("touchend", startScan, false);
resultDiv = document.querySelector("[ng-model='user.result']");
}
function startScan() {

    cordova.plugins.barcodeScanner.scan(
        function (result) {
            //var s = result.text;
            var s = result.text;
            resultDiv.innerHTML = s;
        }, 
        function (error) {
            alert("Scanning failed: " + error);
        }
    );

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions