title: Angular - simple controller understanding
body: <p>I am trying to implement a simple controller to output navigation items:</p>
  
  <p>in index.html I have the following:</p>
  
  <pre><code>   &lt;nav ng-controller="Nav"&gt;
          &lt;ul&gt;
              &lt;li ng-repeat="c in catalog"&gt;
                  {{c.name}}
                  &lt;p&gt;{{c.url}}&lt;/p&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/nav&gt;
  </code></pre>
  
  <p>and in controllers.js I have:</p>
  
  <pre><code>'use strict';
  
  /* Controllers */
  
  angular.module('c.controllers', []).
    controller('MyCtrl1', [function() {
  
    }])
    .controller('MyCtrl2', [function() {
  
    }])
      .controller('Nav', function Nav($scope) {
          $scope.catalog = [
              {'name': 'Nav 1',
                  'url': '#/view1'},
              {'name': 'Nav 2',
                  'url': '#/view2'},
              {'name': 'Nav 3',
                  'url': '#/view3'}
          ];
      });
  </code></pre>
  
  <p>It doesnt work though, the repeat dosnt work and i just get the following output:</p>
  
  <pre><code>    &lt;nav  ng-controller="Nav"&gt;
          &lt;ul&gt;
              &lt;li ng-repeat="c in catalog"&gt;
                  {{c.name}}
                  &lt;p&gt;{{c.url}}&lt;/p&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/nav&gt;
  </code></pre>
  
  <p>Have have I done wrong, or havent done at all?</p>
  
  <p>EDIT:</p>
  
  <p>I have the following on my html tag:</p>
  
  <pre><code>&lt;html lang="en" ng-app="myApp"&gt;
  </code></pre>
  
  <p>I can see the following error in the console:</p>
  
  <pre><code>Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
  Error: [$injector:modulerr] Failed to instantiate module myApp.controllers due to:
  Error: [$injector:nomod] Module 'myApp.controllers' 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
  </code></pre>