angular-ui / ui-router

The de-facto solution to flexible routing with nested views in AngularJS
http://ui-router.github.io/
MIT License
13.54k stars 3k forks source link

How can I make angular ui-router work with html5mode=true automatically? #372

Closed henrytao-me closed 11 years ago

henrytao-me commented 11 years ago

Hi all! How can I make angular ui-router work with html5mode=true automatically? I mean:

In angular, you have the link like this href="#/abc". If you set html5mode=true, it automatically redirect to /abc when you click on link abc. If html5mode=false, it keeps #/abc. So, nothing need to change in your html code.

In angular ui-router, if you plan to enable html5mode=true, you need to change all link from html code to something like: (without #). If html5mode=false, you need to have # in url.

So, how to fix it in angular ui-router? Thanks for advice!

dnyaneshwarjadhav commented 6 years ago

I am using springboot and angularjs 1.7.x I removed hashbang using html5mode enable, but not able to download file from server. response status is 404 always.