I've read up on
this:
https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#how-to-configure-your-server-to-work-with-html5mode
I understand my issue is with using ui-router in html5mode, and that nginx
must be configured to support it.
I've searched all over for an answer to my problem, and have tried almost
everything.
My index.html page renders appropriately. I can access sub page and all
content and modules are loading.
Still, I receive "Cannot Get /mypage/mysubpage" when refreshing my browser
or attempting to access a url directly.
I'm using yeoman "generator-angular" and am able to successfully build the
site with Grunt to /dist.
My nginx server block:
server {
listen 80;
root /var/www/my-site/public_html/dist;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name my-site;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
try_files $uri $uri/ /index.html =404;
}
}
No matter what I do, I can't seem to resolve the issue.
Does anyone have experience with this and can advise.
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.