2
I have an app with ui.router working normally, but a second application has a "!" after the "#"
Ex: http://localhost:8090/dev/#!/home
Why does that happen?
The normal should be: http://localhost:8090/dev/#/home
2
I have an app with ui.router working normally, but a second application has a "!" after the "#"
Ex: http://localhost:8090/dev/#!/home
Why does that happen?
The normal should be: http://localhost:8090/dev/#/home
2
One possibility is that Angular is configured to use the HTML5 standard for Urls without hash, but the browser has no mode support. From angular documentation:
Fallback for legacy browsers
For browsers that support the HTML5 history API, $Location uses the HTML5 history API to write path and search. If the history API is not supported by a browser, $Location Supplies a Hashbang URL. This Frees you from having to Worry about whether the browser viewing your app Supports the history API or not; the $Location service makes this Transparent to you.
Freely translated:
Fallback for old browsers
For browsers that support the HTML5 History API,$location
uses it to write searches and paths. If the API is not supported by the browser,$location
provides a hashbang URL [n. t.:#!
]. Hence the developer does not have to worry whether the browser supports the API or not; the service makes this process transparent to you.
Browser other questions tagged angularjs ui-router
You are not signed in. Login or sign up in order to post.
Possible duplicate of Why Angularjs defaults to # in the URL?
– Diego Souza
It is not duplicated, the question is the "#!" and not the "#"
– Daniel
That’s why it says "Possible".
– Diego Souza
Thanks for the tip
– Daniel
Solved: http://stackoverflow.com/questions/41365887/angularjs-ui-router-application-has-in-the-url
– Daniel