Angular Route Infinite Loop Angular Route Infinite Loop angularjs angularjs

Angular Route Infinite Loop


Silly me I realized the problem. I guess it makes sense but the template url needs to have a forward slash in front of it when the page is multiple "directories" deep.

.config(["$routeProvider", "$locationProvider", function($routeProvider, $locationProvider){    $locationProvider.html5Mode(true);    $routeProvider.when("/", {        templateUrl: "/pages/index.html",        controller: "IndexCtrl"    }).when("/listhome", {        templateUrl: "/pages/listhome.html",        controller: "ListHomeCtrl"    }).when("/profile", {        templateUrl: "/pages/profile.html",        controller: "ProfileCtrl"    }).when("/newlist", {        templateUrl: "/pages/newlist.html",        controller: "NewListCtrl"    }).when("/userlists/:id", {        templateUrl: "/pages/userlists.html",        controller: "UserListsCtrl"    }).otherwise({        redirectTo: "/"    });}]);

Hopefully that helps someone else with a similar problem.