title: Update Ionic UI element with callback
body: <p><strong>Stroy:</strong>
  I am doing small mobile application with appery.io which will scan qr code and according to value hide/show a button.</p>
  
  <p><strong>Problem:</strong>
  button will  hide when i change the variable(name:hide)  boolean value:</p>
  
  <pre><code>$scope.QRscanner = function (_callback) {
       cordova.plugins.barcodeScanner.scan(
            function (result)
            {
                if(result.cancelled!=1){
  
                  $scope.hide = false;
                  $scope.scannedValue = result.text;
                  _callback(false);
                }
                else
                {    _callback(true);
                    alert("Operation cancelled");
  
                }
  
            },
            function (error) {
                $scope.hide = true;
            },
            {
                preferFrontCamera : true, // iOS and Android
                showFlipCameraButton : true, // iOS and Android
                showTorchButton : false, // iOS and Android
                torchOn: false, // Android, launch with the torch switched on (if available)
                prompt : "Place a barcode inside the scan area", // Android
                resultDisplayDuration: 500, // Android, display scanned text for X ms. 0 suppresses it entirely, default 1500
                formats : "QR_CODE,PDF_417", // default: all but PDF_417 and RSS_EXPANDED
                orientation : "landscape", // Android only (portrait|landscape), default unset so it rotates with the device
                disableAnimations : true // iOS
            }
         );
  }
  </code></pre>
  
  <p>This is the callback function;</p>
  
  <pre><code>$scope.Callback = function (result) 
  {
  alert("result"+result);
  $scope.hide=result;
  }
  </code></pre>
  
  <p>Finally i will call this QRscanner function in <strong>ng-click</strong> with parameter callback function name.</p>
  
  <pre><code>QRscanner(Callback);
  </code></pre>
  
  <p>I'm very new to ionic + angular.kind help will be much appreciated.</p>