Reputation: 57286
Can I change the default Angular routing hashtag #
to #!
?
app.config(function($routeProvider){
$routeProvider
.when("/:module/:method/",
{
templateUrl: "template/app.html",
controller: "AppCtrl2"
});
});
the routing code above is meant for an url like,
http://localhost/myapp/#/page/summary/
what about if I want my hashtag url to be like this below?
http://localhost/myapp/#!page/summary/
Upvotes: 1
Views: 1361
Reputation: 5585
Messing with the location provider should do the trick.
app.config(function($locationProvider) {
$locationProvider.hashPrefix('!');
});
Upvotes: 3