Angular.js: Cannot Set Default Route When No Hash June 25, 2024 Post a Comment The problem is: I cannot reach home page when url is www.some.com but can when it's www.some.com/#! or www.some.com/#!/ I was define default web app route: $routeProvider.when('',Solution 1: Try setting the < base > tag.<head><basehref="/"></head>CopyHave a route defined for home.when('/home', { templateUrl: pathToIncs + 'home.html', controller: 'homeController' }) Copyusing redirectTo on the "/".when('/', { redirectTo: '/home' }) Copyalong with the .otherwise.otherwise({ redirectTo: '/home' }); Copy Share Post a Comment for "Angular.js: Cannot Set Default Route When No Hash"
Post a Comment for "Angular.js: Cannot Set Default Route When No Hash"