I've got an AngularJS project, and I'm using $routeProvider
and $locationProvider
with ngView
to swap out parts of the DOM as necessary. I'm running Angular 1.0.6.
However, when I define a link in my document like <a href="#!/view2">View 2</a>
, it gets turned into ?q=home/#!/view2
when I click on it.
Why does the query string get added? How can I prevent that?
$locationProvider.hashPrefix("!");
. See developers.google.com/webmasters/ajax-crawling/docs/… for details.$routeProvider
and$locationProvider
".