title: Can anyone explain this small piece of code?
body: <p>I was looking at one of the custom implementations of <code>ng-blur</code> (I know it's already available in the standard AngularJS now). The last line is what I don't understand.</p>
  
  <pre><code>.controller('formController', function($scope){
  
  $scope.formData = {};
  
  $scope.myFunc = function(){
      alert('mew');
      console.log(arguments.length);
  }
  })
  .directive('mew', function($parse){
        return function(scope, element, attr){
          var fn = $parse(attr['mew']);
          element.bind('blur', function(event){
              scope.$apply(function(){
                  fn(scope);
              });
          });
      }
  });
  </code></pre>
  
  <p>In the view there's a simple <code>mew="myFunc()"</code> applied to inputs. </p>
  
  <p>My question is why are we passing the scope to the function in the very last line of the directive. I tried to make it work without that but it doesn't. What's actually happening?</p>
  
  <p>Also this too works <code>scope.$apply(attr.mew)</code>. Same reason or something different?</p>