title: Error: [$injector:modulerr]
body: <p>I am a newbie. Just learning/trying to integrate Angular with my webapp (Java + jQuery+ requireJS). I am not using any router and below is my script. From other <a href="https://stackoverflow.com/questions/18287482/angularjs-1-2-injectormodulerr">stackoverflow</a> I learned that this error is due to missing inclusion of ngRoute module. Since version 1.1.6 it's a separate part. But in my below code I am not at all using any ngRouter. When I am not referencing it why am I getting this error ?</p>
  
  <p><strong>Error: [$injector:modulerr] Failed to instantiate module counter due to: [$injector:nomod] Module 'counter' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. <a href="http://errors.angularjs.org/1.2.11/" rel="nofollow noreferrer">http://errors.angularjs.org/1.2.11/</a>$injector/nomod?p0=counter</strong></p>
  
  <p>Template:</p>
  
  <pre><code>&lt;ul ng-app="counter" ng-controller="counterController"&gt;
  &lt;li&gt;
     &lt;span class="ui-button-text" ng-bind="critical"&gt;&lt;/span&gt;
  &lt;/li&gt;
  &lt;li&gt;
     &lt;span class="ui-button-text" ng-bind="error"&gt;&lt;/span&gt;
  &lt;/li&gt;
  &lt;li&gt;
     &lt;span class="ui-button-text" ng-bind="warn"&gt;&lt;/span&gt;
  &lt;/li&gt;
  &lt;li&gt;
     &lt;span class="ui-button-text" ng-bind="note"&gt;&lt;/span&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>requirejs.config({
    paths : {  angular: "/js/lib/angular/angular.min" },
    shim : {  "angular": {  deps: [ "jquery"],  exports: "angular" } }
  });
  
  require(["angular", "jquery"],function() {
  
  var module = angular.module('counter', []);
  
  module.controller('CounterController', function ($scope, $http, $timeout) {
      $scope.critical = 0;
      $scope.error = 0;
      $scope.warn = 0;
      $scope.note = 0;
  
      function setData(d){
          $scope.critical = d.critical;
          $scope.error = d.error;
          $scope.warn = d.warn;
          $scope.note = d.note;
      }
  
      var getCounters = function() {
          var config = {headers: {
                  'X-MY-Request': (new Date()).getMilliseconds()
              }
          };
  
          $http.get('xxxxxxx', config)
                  .success(function(data, status, headers, config) {
              setData(data);
              $timeout(getCounters, 60000);
          }).error(function(data, status, headers, config) {
              // Handle the error
          });
  
      }
  
  
      $timeout(getCounters, 500);
  });
  </code></pre>