Is it possible to remove the # symbol from angular.js URLs?
I still want to be able to use the browser's back button, etc, when I change the view and will update the URL with params, but I don't want the # symbol.
The tutorial routeProvider is declared as follows:
angular.module('phonecat', []).
config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/phones', {templateUrl: 'partials/phone-list.html', controller: PhoneListCtrl}).
when('/phones/:phoneId', {templateUrl: 'partials/phone-detail.html', controller: PhoneDetailCtrl}).
otherwise({redirectTo: '/phones'});
}]);
Can I edit this to have the same functionality without the #?
Be sure to check browser support for the html5 history API:
My solution is create .htaccess and use #Sorian code.. without .htaccess I failed to remove #
To remove the Hash tag for a pretty URL and also for your code to work after minification you need to structure your code like the example below: