Exclamation mark after hash (#!) in angularjs app

You probably updated angular version from 1.5 to 1.6, because on 1.6, the angular team decided to change the default $location hash-prefix to '!'. Like @Skrew suggested, you can change that to '' with $locationProvider.hashPrefix('');

Here you can read about that.


Modify these 2 lines :

  .config(function ($routeProvider) {
$routeProvider

to be :

    .config(function ($routeProvider,$locationProvider) {
    $locationProvider.hashPrefix('');
    $routeProvider

Credit should go to : https://stackoverflow.com/a/41223197/1564146

Tags:

Angularjs