title: AngularJS controller not loading
body: <p>I've got an AngularJS app with pages built using Smarty. The top of the page has the <code>ng-agg</code> tag parameter, and basic AngualarJS templates are being compiled, and the <code>.run</code> method of my my module is being run, but my controller is not being called</p>
  
  <p><strong>Start of the html</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="myapp"&gt;
  ...
  </code></pre>
  
  <p><strong>$routeProvider</strong></p>
  
  <pre><code>angular.module('myapp', function($routeProvider, $locationProvider) {
    $routeProvider
      .when('/index.php?page=tutorial', {controller: 'MyappTutorial'})
      .when('/index.php?page=home', {controller: 'MyappHome'})
      .when('/index.php?page=login', {controller: 'MyappLogin'})
  })
  </code></pre>
  
  <p><strong>Tutorial controller</strong></p>
  
  <pre><code>var MyappTutorial = function ($scope, $location) {
      console.log('tutorial');
  }
  </code></pre>
  
  <p>When I visit the page <strong>index.php?page=tutorial</strong> I my angular page template is built and a <strong>console.log()</strong> in my <code>myapp.run()</code> method is triggered, but the tutorial controller doesn't run.</p>
  
  <p>How do I go about debugging this. I'm guessing it's the routeProvider going wrong, is there a way of me checking which controller is being used, if any.</p>
  
  <p>I'm not getting any errors in my javascript console.</p>
  
  <p>This is running in Chrome, from a local development Ubuntu virtual machine, on a Mac.</p>