In my SPA AngularJS application, I am getting the URL as http://localhost:4200/#!/
instead of just # (hash bang)
. Because of this the routing does not seem to work in the usual way.
I did go through this stackoverflow Question but did not find any solution.Anybody knows the solution to get rid of this extra exclamation mark?
EDIT:
In my index.ejs:
I have <a href="#about">about</a>
In my approutapp.js:
I have
var myapp = angular.module("myApp", ["ngRoute"]);
myapp.config(function($routeProvider) {
$routeProvider
.when("/", {
templateUrl : "/static/list.ejs"
})
.when("/about", {
templateUrl : "/static/about-us.ejs"
})
});
myapp.config(['$locationProvider', function($locationProvider) {
$locationProvider.hashPrefix('');
}]);
But the URL which I am still getting: http://localhost:4200/#/!/
and going to http://localhost:4200/about
the page hangs