I already have done $locationProvider.html5Mode(true); but it is not working. Whenever I access http://example.com it goes to http://example.
$locationProvider.html5Mode(true);
http://example.com
http://example.
If you are in .NET stack with MVC with AngularJS, this is what you have to do to remove the '#' from url:
1.Set up your base href in your _Layout page:
2.Then, add following in your angular app config :
$locationProvider.html5Mode(true) $locationProvider.hashPrefix("!");