Sunday 17 December 2017

How to remove #! getting added to url in my AngularJS application?

I have tried:- $locationProvider.html5Mode(true).hashPrefix('!'); and adding but to no avail. When I navigate to a particular url, #! disappears but when I tried to reload, it gives the error:- Cannot GET.So I looked online, and found out that doing above is only half of the solution. We also need to rewrite the logic on server side as well. So I am using NodeJS and browserSync package to fire up localhost. So what is the solutioin to this?Note:- My backend and frontend code are separate and both handle routing.

Submitted December 17, 2017 at 05:13PM by datavinci

No comments:

Post a Comment