You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
As shown in this plunker http://plnkr.co/edit/SWFgpp6ju07IwFB4XLB9?p=preview, if you preview on a separate window, if you click links the partial view is rendered and the url changes, however if the page is refreshed the page shows not found error.
@RoneyIsland:
In order for html5Mode to work properly, the server-side needs also to be appropriately configured (and you obviously can't configure the plunkr backend).
If you want "deep-linking" to work without server-side configuration (i.e. in plunkr as well), you need to use the traditional hashbang mode.
I.e.:
Remove the line: $locationProvider.html5Mode(true);
Prefix the links' href attributes with #/: E.g. instead of href="Book/Moby" use href="#/Book/Moby"
Working demo
This comment in the docs seems somewhat misleading:
// configure html5 to get links working on jsfiddle
$locationProvider.html5Mode(true);
As shown in this plunker http://plnkr.co/edit/SWFgpp6ju07IwFB4XLB9?p=preview, if you preview on a separate window, if you click links the partial view is rendered and the url changes, however if the page is refreshed the page shows not found error.
I'm using ngRoute module for routing. This example is in official docs at https://docs.angularjs.org/api/ngRoute/service/$route
I've uploaded the image showing the problem.



Original view
After clicking a link
After reloading
The text was updated successfully, but these errors were encountered: