AngularJS with MVC 6

﹥>﹥吖頭↗ 提交于 2019-12-02 08:07:56

Okay, so since something didn't exist in the MVC 6/ASP.NET 5 framework, I've created my own middleware that provides a lot more flexibility. It has been added to GitHub and is available through NuGet.

The project page is: https://github.com/a11smiles/AngularMiddleware

I was able do what you are asking here. Basically, I added a catch all route to my index action:

[Route("{*path}")]

meaning if no MVC action does not exist, call my Index action and angular routing will take from there

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!