Friday, February 2, 2018

Can't get Angular subroutes to load directly with an ASP.NET Core backend

I'm looking to use Angular routing while having a ASP.NET Core backend. However, I'm running into the issue where if I try to load a subroute directly or refresh the page while on a subroute, I get returned a 404 error and see a blank page.

The suggestions I've found all seem to use routes.MapSpaFallbackRoute( ) inside of app.UseMvc( ) but I have not gotten this to work for me. I cannot find in-depth explanations into the behavior going on behind the scenes here either other than stating that routing is by default done by ASP.NET Core and has to be redirected to my frontend to use its routes. I've apparently not been able to do that and I'm lost.

How to I make my Angular + ASP.NET Core see my Angular routes? It's really frustrating me.

Can't get Angular subroutes to load directly with an ASP.NET Core backend Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team