Angular: 1.1.5
I go to: http://xxxxx.com/route1/route2/route3
and /route3 gets triggered instead of route1/route2/route3
Works fine with HTML5 mode off ... :(
Nginx config
location / {
index index.html;
try_files $uri $uri/ /index.html?$args;
}
My app config
$routeProvider.when('/route1/route2/route3', {
templateUrl: '/views/home.html',
controller: 'HomeCtrl'
});
$routeProvider.when('/route3', {
templateUrl: '/views/home.html',
controller: 'HomeCtrl'
});
$locationProvider.hashPrefix('!');
$locationProvider.html5Mode(true);
$location Log:
$$protocol: "http", $$host: "xxxxxx"…}
$$absUrl: "http://xxxxxxx.com/route1/route2/route3"
$$hash: ""
$$host: "10.44.11.73"
$$path: "/route3"
$$port: 80
$$protocol: "http"
$$replace: false
$$url: "/route3"
How can I change my settings to make HTML5 urls working with nested routes?