How to route EVERYTHING other than Web API to /index.html

后端 未结 6 479
春和景丽
春和景丽 2020-12-04 12:49

I\'ve been working on an AngularJS project, inside of ASP.NET MVC using Web API. It works great except when you try to go directly to an angular routed URL

6条回答
  •  -上瘾入骨i
    2020-12-04 13:33

    Well, I just removed the RouteConfig.RegisterRoutes(RouteTable.Routes); call in Global.asax.cs and now whatever url I enter, if the resource exists, it will be served. Even the API Help Pages still work.

提交回复
热议问题