title: AngularJS - Access $scope from controller in custom filter
body: <p>I have a <code>controller</code> with various <code>$scopes</code>. I need to access one of these $scopes in a custom filter:</p>
  
  <pre><code>app.controller('AppController',
      function($scope) {
        $scope.var1 = 'Some data1';
        $scope.var2 = 'Some data2';
      }
    );
  
  app.filter('myCustomFilter', function ($filter) {
  
    return function (date) {
      var date = date;
    };
  });
  
  
  &lt;tr ng-repeat="data in MyData" ng-class="{true: 'green', false:'red'}[data.Date | myCustomFilter]"&gt;
  
  &lt;/tr&gt;
  </code></pre>
  
  <p>How can i pass $scope.var1 into my <code>myCustomFilter</code>??</p>