Understanding what it takes to remove the hash # from angular routes
问题 Before removing the hash sign, I had mainApp.config(function ($locationProvider, $routeProvider) { $routeProvider .when(\'/page\', { controller: \'Page\', templateUrl: \'templates/page.html\' }) .when(\'/main\', { controller: \'Main\', templateUrl: \'templates/main.html\' }) .otherwise({ redirectTo: \'/main\'}); //$locationProvider.html5Mode(true); }); and these worked fine http://localhost:8080/index.html#/main http://localhost:8080/index.html#/page After removing the pound sign, I added to