It is new from AngularJS 1.6, which added a new hash prefix.
Due to aa077e8, the default hash-prefix used 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 than mydomain.com/#/a/b/c
the URL will become
mydomain.com/#!/a/b/c
.
Source here for more information.
If you want to remove this prefix, add this code to your config:
appModule.config(['$locationProvider', function($locationProvider) {
$locationProvider.hashPrefix('');
}]);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…