title: AngularJS - $filter is not defined
body: <p>I am trying to inject a filter into my controller and use it as such:</p>
  
  <pre><code>angular
      .module('graduateCalculator', [])
          .filter('slug', function() {
                  return function(input) {
                      if(input) {
                          return input.toLowerCase().replace(/[^a-z-]/g, '-');
                      }
                  };
          }).controller('GraduateCalculatorController', ['$filter', app.graduateCalculator($filter)]);
  </code></pre>
  
  <p>However, I get the above error. I am obviously doing something very wrong - just not obvious enough to me. </p>
  
  <pre><code>Uncaught ReferenceError: $filter is not defined
  </code></pre>
  
  <p>It may have something to do with my function. It's written like so:</p>
  
  <pre><code>var app = {
  
      graduateCalculator: function($filter) {
          window.console.log( $filter('slug')('A random looking string...') );
      }
  
  };
  </code></pre>
  
  <p>Help appreciated!</p>