Angular.js: Cannot Set Default Route When No Hash
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('',
Try setting the < base > tag.
<head><basehref="/"></head>
Have a route defined for home
.when('/home', {
templateUrl: pathToIncs + 'home.html',
controller: 'homeController'
})
using redirectTo on the "/"
.when('/', {
redirectTo: '/home'
})
along with the .otherwise
.otherwise({
redirectTo: '/home'
});
You may like these posts
Post a Comment for "Angular.js: Cannot Set Default Route When No Hash"