I am creating a search application in angularjs with these settings:
App Config:
app.config( [ '$locationProvider', function ($locationProvider) { $locationProvider.html5Mode({ enabled: true, requireBase: false, rewriteLinks: false }); } ] );
The problem is not with the application itself, but when I try to access a page with IE9, I could not access it at all. After I read som, I found out that IE9 ignores everything that comes after # in the URL, and redirects the user back to the host URL (everything up to # in the URL). And the standard reserve for html5mode is hashbang-mode. Angular docs for $ location
My question is, does anyone know if there is a way to use hash bands in the url, or if anyone else has this problem. If additional documentation is required, let me know and I will provide!
EDIT: inside the controller:
$scope.$on('$locationChangeSuccess', function () {; $scope.searchQuery = $location.search()['q']; $scope.search(); });
EDIT: Adding $locationProvider.hashPrefix('!'); will not work because it will only add "!" after the "#" in the url.
See image from angular docs:

source share