Answer the question
In order to leave comments, you need to log in
Routing in AngularJs and #!?
I am writing an application in AngularJs. I made routing in the application, I made it so that the characters #! were not displayed in the address bar. But: if I write localhost:9000/#!/catalog in the address bar, then the application follows the /catalog route. But if you write localhost:9000/catalog , then the route does not go through and the page displays: "Cannot GET: /catalog". Moreover, by such a link:
or using a javascript code: - by these methods, the transition along the route occurs. The problem is in the transition through the address bar, that is, it is impossible to go to the address localhost:9000/catalog, you need to write: localhost:9000/#!/catalog
Who knows how to fix it? <a href="/catalog">
$location.path("/catalog");
Answer the question
In order to leave comments, you need to log in
on the server side, make a return on all urls of the same file, as for the main page
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question