title: Update $scope from inside callback in angularJS
body: <p>I have this controller and I would like to update the <code>$scope.progress</code> from within the function callback. I tried using <code>$rootScope</code> and <code>$scope.apply()</code> but I can't get it to work.
  Is there something I'm missing?</p>
  
  <p>progressupdate is a variable returned by the event. 
  the code is not exactly like this. I made it super simple here to show the structure.</p>
  
  <pre><code>app.controller('player', function($scope) {
  
      var show = function(url) {
          function(err, showOK) {
              if (err) {
                  console.log(err);
              } else {
                  showOK.on('listening', function(){
                       $scope.progress = progressupdate;
                  });
              }
          });
      }
  
      show(url);
  
  });
  </code></pre>
  
  <p>Am I running that function incorrectly inside the controller?
  Should I use something like this?</p>
  
  <pre><code> $scope.show = function(url)...etc
  </code></pre>