I am setting up angular routing for my asp.net mvc app, what I want is to redirect all the request for localhost/users/ to index page so that I can use angular's client side route except localhost/users/add, which I will use .Net's route. How to set it up RouteConfig?
Here is my current setting and I don't believe it's working
routes.MapRoute(
name: "UsersCatchAllRoute",
url: "Users/{action}",
defaults: new
{
controller = "Users",
action = "Index",
id = UrlParameter.Optional
},
constraints: new { action = @"(?-i)add" }