0

I tried removing # from the URL like http://locohost:8080/app/#/home .

Tried using

$locationProvider.html5Mode({
  enabled: true,
  requireBase: false,
  hasPrefix: ''
});

Also added <base href=""/> in index.html inside <head> tag

But on hitting the URL http://locohost:8080/app/home, getting 404 error

Manish Balodia
  • 1,863
  • 2
  • 23
  • 37
  • 1
    Have you checked this article https://medium.com/@sagar.mane006/removing-from-url-in-angularjs-789f9f0b24a7 – saketh Jun 19 '19 at 18:32

1 Answers1

0

Try using:

str.replace("/#/","/")
double-beep
  • 5,031
  • 17
  • 33
  • 41