title: Access scope variables from a filter in AngularJS
body: <p>I am passing <code>date</code> value to my custom filter this way:</p>
  
  <pre><code>angular.module('myapp').
    filter('filterReceiptsForDate', function () {
      return function (input, date) {
        var out = _.filter(input, function (item) {
          return moment(item.value.created).format('YYYY-MM-DD') == date;
        });
        return out;
      }
    });
  </code></pre>
  
  <p>I would like to inject a couple of scope variables there too, like what I can do in directives. Is that possible to do this without having to passing these vars explicitly as function arguments?</p>