0

I have used gulp to build my client angularJS application. After i deployed into IIS i'm getting an issue. My page is working fine when navigate through menu's. But when i refresh by page (or) copy and paste the URL its giving me 404 error. HTTP Error 404.0 - Not Found can anyone help me, to resolved this?

Velkumar
  • 446
  • 1
  • 8
  • 20

1 Answers1

0

Use the otherwise method, which is the default route when none of the others get a match


Did you configured otherwise option in your route config section?

like this below?

app.config(function($routeProvider) {
   $routeProvider.otherwise({
             templateUrl : "main.htm",
             controller : "mainController"
        });
});

You can test it under this link

https://www.w3schools.com/angular/tryit.asp?filename=try_ng_routing_otherwise

I hope you can solve your issue by this below discussion

Refreshing page gives "Page not found"

Community
  • 1
  • 1
Ramesh Rajendran
  • 37,412
  • 45
  • 153
  • 234