Currently, I am managing routing in ASP.NET MVC using the RouteCollection class. However, my front end is built with Angular and there are instances where I need to update the URL using Angular's $location service while also supporting HTML5. To achieve this, I included the following line in my module.config :
$locationProvider.html5Mode(true);
After implementing this change, it appears that Angular is now handling my routing.
For instance, my single page application is located at mysite.com/user and I want to modify the URL using Angular's $location (such as updating the URL to mysite.com/user/tab without triggering a reload) when users interact with certain elements.
However, whenever a user navigates from this page to another like mysite.com/other, I prefer ASP.NET MVC to handle the routing.
The issue arises as my URL changes to mysite.com/other but the website fails to navigate to the corresponding page, indicating that the ASP.NET MVC routing is not being processed.
UPDATE
All of my routes are server-side defined; I do not have any routes set up in Angular. The problem of server-side routing ceasing to work emerged after the addition of
$locationProvider.html5Mode(true);