title: How would I update a controller variable that is outside of a $scope.$on from within it in angular?
body: <p>I have a variable in my angular controller and I have a $scope.$on that I want to update that variable when it is called. However, I can't seem to figure out how to update that variable from within the $scope.$on. When I try to console.log the changed variable from within and from outside, it doesn't get updated. Any ideas on how to accomplish what I need?</p>
  
  <pre><code>ctrl.updateThisVar = false;
  
  $scope.$on('app::createNew', function($event, args) {
    ctrl.updateThisVar = true;
    // also tried scope.controllerName.updateThisVar = true;
  });
  </code></pre>