title: Cause of angular error: "Error: No module: ngCookies"?
body: <p>In my app I'm doing this:</p>
  
  <pre><code>angular.module('myApp.controllers', ['ngCookies']).
    controller('AppCtrl', function ($scope, socket, $cookies) {
          console.log("socket:");
          console.log(socket);
          $scope.component = 'main';
          gLoggedIn = "no";
          gUserName = "";
          console.log("reset logged in status");
          sid = $cookies;
          $scope.setComponent = function(val) {
              $scope.component = val;
          }
    }).
  </code></pre>
  
  <p>But I keep getting the error: </p>
  
  <p><code>TypeError: 'undefined' is not an object (evaluating 'angular.module')" and "Error: No module: ngCookies</code></p>
  
  <p>Obviously I load ['ngCookies'] here in the module! And what's more, I did a bower install of angular, angular-cookies, and angular-loader, and added this to my index.jade:</p>
  
  <pre><code>script(src='bower_components/angular-cookies/angular-cookies.js')
  script(src='bower_components/angular/angular.js')
  script(src='bower_components/angular-loader/angular-loader.js')
  </code></pre>
  
  <p>So what gives? </p>
  
  <p>I tried adding ['ngCookies'] in various places to no avail: app.js, nope; services.js, nope; so what is the problem? </p>