I am building a AngularJS APP and I have routing working for the first layer of routes:
ie:
/blah
/blah2
/blah3
However, when I get to a more complex route such as:
/blah/thing
/blah2/things
/blah3/things
These are not routing correctly when refreshing the page. However work perfectly fine when clicking a link to them from the SPA.
I am running nginx with the following conf:
server {
listen 80;
root /home/app/public;
index index.html;
server_name dev-app.com;
location / {
try_files $uri $uri/ $uri.html /index.html;
}
}
And here are some example routes:
.when('/instances/running', {
templateUrl : 'pages/instances-running.html',
controller : 'instancesController',
currentPage : 'Running Instances',
})
.when('/instances/stopped', {
templateUrl : 'pages/instances-stopped.html',
controller : 'instancesController',
currentPage : 'Stopped Instances',
})
.when('/tickets/open', {
templateUrl : 'pages/tickets-open.html',
controller : 'ticketsController',
currentPage : 'Open Tickets',
})
Please let me know if this is something I can fix or something inherently broken.
Thanks!