for some unknown reason, I have \'#!\' added to my apps url when debugging in visual studio 2015.
urls look like this
http:
You should apply this in order to not to have hash bang for angular
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
<head>
<base href="/">
...
</head>
for angular 2, this is enough, I think:
<base href="/" />
Per your comment it seems some how you switch Hashbang Mode
Configuration:
$routeProvider
.when('/path', {
templateUrl: 'path.html',
});
$locationProvider
.html5Mode(false)
.hashPrefix('!');
Please see this
I have found this in angualr 1.6.0 changelog
$location: default hashPrefix to '!' (aa077e, #13812)
changelog: https://github.com/angular/angular.js/blob/master/CHANGELOG.md
change: https://github.com/angular/angular.js/commit/aa077e81129c740041438688dff2e8d20c3d7b52
BREAKING CHANGE
The hash-prefix for
$location
hash-bang URLs has changed from the empty string "" to the bang "!". If your application does not use HTML5 mode or is being run on browsers that do not support HTML5 mode, and you have not specified your own hash-prefix then client side URLs will now contain a "!" prefix. For example, rather thanmydomain.com/#/a/b/c
will becomemydomain/#!/a/b/c
.
to revert to the old way just use
appModule.config(['$locationProvider', function($locationProvider) {
$locationProvider.hashPrefix('');
}]);