2
I’m trying to make the app (Cordova + Onsen) read a QR Code and when reading open the link contained in the QR, but instead open the link it tries to open a page at the application root (file://android_asset/www/Barcode.result).
In the code I just added the var ref = window.open('barcode.result', '_blank'); the rest is working normally, just does not open the link contained in the QR.
Follow my controller code:
app.controller('barcodeController', function( $scope ) {
    $scope.barcode = {
        'result': '',
        'format': '',
        'cancelled': ''
    };
    $scope.startScanner = function() {
        cordova.plugins.barcodeScanner.scan(function (result) {
            $scope.$apply(function() {
                $scope.barcode = {
                    'result': result.text,
                    'format': result.format,
                    'cancelled': result.cancelled
                }
                var ref = window.open('barcode.result', '_blank'); //parte acrescentada
            });
        },
        function (error) {
            alert("Scanning failed: " + error);
        }
    )};
});
						
I tried, but then nothing happens, it goes back to the screen with the button to scan the QR...
– Luiz Tokuhara