title: Can't Get Angular To Load Routes
body: <p>I am making a local page following this <a href="https://thinkster.io/django-angularjs-tutorial#registering-new-users" rel="nofollow noreferrer">tutorial</a>, and it implements a login using django and angular. But I can't get the button <strong>register</strong> to show anything. It just changes the directory to /register. I think it has to do with routing. I get no errors. And I don't know how to debug this thing anymore, so I've run out of options. This is my first 'website'.</p>
  
  <p>Reason this isn't going smooth is because I did not get the starter project the tutorial came with. I wanted to learn how to implement this from scratch. This means my packages are newer (bootstrap, django, etc). Let me know if you need any more info, please. Thanks.</p>
  
  <p>/templates/index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="hawk"&gt;
  
  &lt;head&gt;
    &lt;title&gt;Hawk&lt;/title&gt;
    &lt;link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    {% include 'navbar.html' %}
  
    &lt;div class="container-fluid"&gt;
      &lt;div class="row"&gt;
        &lt;div class="col-xs-12 ng-view"&gt;&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    {% include 'javascripts.html' %}
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>/static/javascripts/hawk.routes.js</p>
  
  <pre><code>(function () {
      'use strict';
  
      angular
          .module('hawk.routes')
          .config(config);
  
      config.$inject = ['$routeProvider'];
  
      function config($routeProvider) {
          $routeProvider.when('/register', {
              controller: 'RegisterController',
              controllerAs: 'vm',
              templateUrl: '/static/templates/authentication/register.html'
          }).otherwise('/');
      }
  })();
  </code></pre>
  
  <p>/static/javascripts/authentication/controllers/register.controller.js</p>
  
  <pre><code>(function () {
      'use strict';
  
      angular
          .module('hawk.authentication.controllers')
          .controller('RegisterController', RegisterController);
  
      RegisterController.$inject = ['$location', '$scope', 'Authentication'];
  
      function RegisterController($location, $scope, Authentication) {
          var vm = this;
          console.log("\n\nregister\n\n");
          vm.register = register;
  
          function register() {
              Authentication.register(vm.email, vm.password, vm.username);
          }
      }
  })();
  </code></pre>
  
  <p>/static/javascripts/hawk.js</p>
  
  <pre><code>(function () {
    'use strict';
  
    angular
      .module('hawk', [
        'hawk.routes',
        'hawk.authentication',
        'hawk.config',
      ]);
  
    angular
      .module('hawk.routes', [require('angular-route')]);
    angular
      .module('hawk.config', []);
    angular
      .module('hawk')
      .run(run);
    run.$inject = ['$http'];
  
    function run($http) {
      $http.defaults.xsrfHeaderName = 'X-CSRFToken';
      $http.defaults.xsrfCookieName = 'csrftoken';
    }
  })();
  </code></pre>
  
  <p>/templates/javascripts.html</p>
  
  <pre><code>{% load compress %} {% load staticfiles %} {% compress js %}
  &lt;script type="text/javascript" src="{% static '../node_modules/jquery/dist/jquery.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static '../node_modules/bootstrap/dist/js/bootstrap.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static '../node_modules/bootstrap-material-design/dist/js/material.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static '../node_modules/bootstrap-material-design/js/ripples.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static '../node_modules/underscore/underscore.js' %}"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="{% static '../node_modules/angular/angular.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static '../node_modules/angular-route/angular-route.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static '../node_modules/angular-cookies/angular-cookies.js' %}"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="{% static '../node_modules/ng-dialog/js/ngDialog.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static 'lib/snackbarjs/snackbar.min.js' %}"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="{% static 'javascripts/hawk.js' %}"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="{% static 'javascripts/hawk.config.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static 'javascripts/hawk.routes.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static 'javascripts/authentication/authentication.module.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static 'javascripts/authentication/services/authentication.service.js' %}"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="{% static 'javascripts/authentication/controllers/register.controller.js' %}"&gt;&lt;/script&gt; 
  {% endcompress %}
  </code></pre>
  
  <p>/static/javascripts/authentication/services/authentication.service.js</p>
  
  <pre><code>(function () {
      'use strict';
      angular
          .module('hawk.authentication.services')
          .factory('Authentication', Authentication);
      Authentication.$inject = ['$cookies', '$http'];
  
      function Authentication($cookies, $http) {
          var Authentication = {
              register: register
          };
  
          return Authentication;
  
          function register(email, password, username) {
              return $http.post('/api/v1/accounts/', {
                  username: username,
                  password: password,
                  email: email
              });
          }
      }
  })();
  </code></pre>
  
  <p>/HawkProject/urls.py</p>
  
  <pre><code>from django.contrib import admin
  from django.urls import path, re_path, include
  from rest_framework_nested import routers
  from authentication.views import AccountViewSet
  from HawkProject.views import IndexView
  
  router = routers.SimpleRouter()
  router.register(r'accounts', AccountViewSet)
  
  urlpatterns = [
      path('admin/', admin.site.urls),
      re_path(r'^api/v1/', include(router.urls)),
  
      re_path(r'^.*$', IndexView.as_view(), name='index')
  ]
  </code></pre>