title: AngularJs How passing arguments to $scope.$apply?
body: <p>I want pass arguments from directive to controller.
  Into html i have:</p>
  
  <pre><code>&lt;div id="myTest" class="scrollable-content" scrolly="inScroll(value)"&gt;
  </code></pre>
  
  <p>My directive is:</p>
  
  <pre><code>app.directive('scrolly', [function () {
  return {
      restrict: 'A',
      link: function (scope, element, attrs) {
          console.log('loading directive');
  
          element.bind('scroll', function () {
              var value = 1;
              alert(attrs.scrolly);
              scope.$apply(attrs.scrolly);
          });
      }
  };
  }]);
  </code></pre>
  
  <p>into controller i have:</p>
  
  <pre><code>$scope.inScroll = function(value) {
    alert(value);
  };
  </code></pre>
  
  <p>When i scroll the page, the directive set the value = 1; and then call the function inScroll(value), but the function receive value undefined</p>
  
  <p>Can you help me?
  Thank You</p>