If the application uses the Angular router, you must configure the server to return the application's host page (index.html
) when asked for a file that it does not have.
A routed application should support "deep links". A deep link is a URL that specifies a path to a component inside the application. For example, http://www.mysite.com/heroes/42
is a deep link to the hero detail page that displays the hero with id: 42
.
There is no issue when the user navigates to that URL from within a running client. The Angular router interprets the URL and routes to that page and hero.
But clicking a link in an email, entering it in the browser address bar, or merely refreshing the browser while on the hero detail page —all of these actions are handled by the browser itself, outside the running application. The browser makes a direct request to the server for that URL, bypassing the router.
A static server routinely returns index.html
when it receives a request for http://www.mysite.com/
. But it rejects http://www.mysite.com/heroes/42
and returns a 404 - Not Found
error unless it is configured to return index.html
instead.
In short Domino server does not reference the Index.html with Angular JS router and shows error 404