Mr.H. Mr.H. -4 years ago 104
AngularJS Question

Loosing hash (#) in Angular URL using ui-router

my singlepage angularjs application can be accessed through the root address of my webserver like.


When I chose to go for example to the home-state the application is supposed change the url in the browsers addessfield to
where the first part (
) points to my angular application and the second part (
) points to the home-states url.

But instead of doing what it's supposed to do my angular-application changes the url in the browsers addressfield to
which on reload obviously creates a 404.

Can any of you tell me what I am doing wrong or at least give me a hint on where to look?

Answer Source

disable the html5 mode from the config. add/change the following line in the config


This will add the # to your url.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download