Skip to content Skip to sidebar Skip to footer

Angular Routes Contain #! In The Url Instead Of #

Recently I have noticed that when using ngRoute module in an AngularJS app, the route contains #! in the URL, which was earlier just the #. For example, www.webiste.com/#/login bec

Solution 1:

It's called the hash bang.

For a while Twitter was using the same thing. It allows for AJAX calls and let search engines know your path without using a "real" path. It's considered obsolete though.

https://developers.google.com/webmasters/ajax-crawling/docs/getting-started

There is another stackoverflow answer about that:

Doing links like Twitter, Hash-Bang #! URL's


Update:

One of the reasons for not having a need for the hash bang anymore is that we can push the history state without a page reload. Something so called "one page" websites, like React, do.

Post a Comment for "Angular Routes Contain #! In The Url Instead Of #"