title: (AngularJS) Can't inject factory into controller
body: <p>I'm trying to inject my factory into a controller. If I list the factory as one of the controller's parameters, I get this error:</p>
  
  <pre><code>Error: [$injector:unpr] Unknown provider: wordRushFacProvider &lt;- wordRushFac &lt;- wordrushCtrl
  http://errors.angularjs.org/1.6.1/$injector/unpr?p0=wordRushFacProvider%20%3C-%20wordRushFac%20%3C-%20wordrushCtrl
  </code></pre>
  
  <p>Here is the code for my factory:</p>
  
  <pre><code>(function() {
      "use strict";
  
      angular
      .module("wordrush")
      .factory("wordRushFac", function($http) {
  
          function getValidWords() {
              return $http.get('../data/valid-words.txt');
          }
  
          return {
              getValidWords : getValidWords
          }
      })
  })
  </code></pre>
  
  <p>And the code for my controller:</p>
  
  <pre><code>(function() {
      'use strict'
  
      angular
      .module('wordrush')
      .controller('wordrushCtrl', function($scope, $http, wordRushFac) {
  
          wordRushFac.getValidWords().then(function(words) {
              $scope.words = words.data;
          });
          $scope.words = 'Hello'
      });
  })();
  </code></pre>
  
  <p>And for my index.html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;Word Rush&lt;/title&gt;
  
          &lt;link rel="stylesheet" href="node_modules/angular-material/angular-material.css"&gt;
          &lt;link rel="stylesheet" type="text/css" href="css/style.css"&gt;
  
          &lt;script src="node_modules/angular/angular.js"&gt;&lt;/script&gt;
          &lt;script src="scripts/app.js"&gt;&lt;/script&gt;
          &lt;script src="components/wordrush.ctr.js"&gt;&lt;/script&gt;
          &lt;script src="components/wordrush.fac.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body ng-app="wordrush" ng-controller="wordrushCtrl"&gt;
          &lt;h1&gt; {{ words }} &lt;/h1&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And for my app.js:</p>
  
  <pre><code>angular
  .module('wordrush', ['ngMaterial'])
  .config(function($mdThemingProvider) {
  
      $mdThemingProvider.theme('default')
      .primaryPalette('blue')
      .accentPalette('green');
  })
  </code></pre>
  
  <p>I made a program with code identical to this except the names and variables were changed, and it worked fine. So what am I doing wrong here?</p>