You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular
I'm developing an angular 2 app.
So essentialy, if I run the app with "ng serve" all works fine, if I refresh the page (for example http://localhost:4200/home) it works fine and angular recognizes the right route.
The problem occurs when I build the app in a war and deploy it on wildfly with a different context path (ex. /myapp). At this point the routing navigation works fine but if I refresh the page I receive a "Not found error". My base href on index.html is <base href="."> I also tried with <base href="./myapp"> but in this case angular try to look for the resources under http://myhost/ and not under http://myhost/myapp/
Anyone have any idea on how to fix it?
Sander Elias
unread,
Dec 23, 2016, 12:01:13 AM12/23/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular
Hi Fabrizio,
Yes, fix your server so it returns the index.html instead of a 404.