I am trying to creating a polling app on the mean stack. I think my routing is messed up but I am not sure

524 Views Asked by At

I am trying to create the polling app described in this tutorial here.

I have step 2 finished, and I am about to start step 3(once my application is running properly) which is to incorporate the DB portion. My application is not behaving like the application listed in the tutorial currently though.

I have scanned my code numerous times and debugged it and still cant seem to catch what is throwing it off. When I run the application it runs fine, but none of my partials are being displayed only what is provided in the inital index.html view, so it is simply showing my blank navbar.

I have provided my git repository. If anyone has a moment and can take a look at it. Thank you for your time in advance.

1

There are 1 best solutions below

1
On BEST ANSWER

Some of the key things I fixed in my pull request:

  1. You need to include angular-route.js as a separate file now, and have your module depend on ngRoute.
  2. You were missing quotes around the first $routeProvider in the following line:

    .config(['$routeProvider',function($routeProvider){

  3. You now need to register controllers using a name (string) with the module, rather than using global functions.

    app.controller('ControllerName', function ($scope, ...) { ... });

  4. You also forgot to actually reference a few of the JS files you need in index.html using <script> tags.

There are other small things, but see the PR for the full details. I also changed the way bower components are done.