title: angularjs requirejs routeprovider stuck on main page
body: <p>I am using requirejs with angular and I cannot get the Route provider to work:</p>
  
  <pre><code>require.config({
  
  // alias libraries paths
  paths: {
      'angular': 'vendor/angular.min',
      'angularRoute': 'vendor/angular-route'
  },
  
  // angular does not support AMD out of the box, put it in a shim
  shim: {
      'angular': {exports: 'angular'},
      'angularRoute':['angular']
  },
  priority: ["angular"]
  });
  require([
       'angular',
       'app'
       ],
      function(angular, app){
          'use strict';
          var $html = angular.element(document.getElementsByTagName('html')[0]);
          angular.element().ready(function() {
          $html.addClass('ng-app');
          angular.bootstrap($html, [app['name']]);
          app.config(['$routeProvider',
                      function($routeProvider){
                          $routeProvider.when('/',{
                              templateUrl: 'views/home.html',
                              controller:'MyCtrl1'
                          })
                          .when('/views2',{
                              templateUrl: 'views/home.html',
                              controller:'MyCtrl2'
                          })
                          .otherwise({
                              templateUrl: 'views/dontknow',
                              controller:'MyCtrl2'
                          })
                      }
          ]);
  }); 
  })
  </code></pre>
  
  <p>My base app URL looks like following: <a href="http://example.com:8080/HOMEPAGE/" rel="nofollow">http://example.com:8080/HOMEPAGE/</a>
  When I type in <a href="http://example.com:8080/HOMEPAGE/#views2" rel="nofollow">http://example.com:8080/HOMEPAGE/#views2</a> shouldnt this try and pull the home.html?</p>
  
  <p>My controller looks like following:</p>
  
  <pre><code>define(['angular'], function (angular) {
  'use strict';
  var myController = angular.module('myController', []);
  myController.controller('MyCtrl1', ['$scope', function ($scope) {
          $scope.greeting = "hello world";
      }]).controller('MyCtrl2', ['$scope', function ($scope) {
          $scope.greeting = "hello world2";
      }]);
  return myController;
  
  });
  </code></pre>