I would like to use Angular.JS to implement multiple contact forms, but am not sure how to keep angular's routing from interfering with ASP.Net's routing.
My ASP.Net MVC 4 routes look like this (this is the default project with minor alterations):
namespace Angular_Test
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{action}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}
I would like my contact page's (located at /contact) ng-view div to default to something like (say) form.html, and have a handful of links that would load in form2.html, form3.html, etc. But would pointing those links to something like /contact/form2 totally screw with ASP.Net's routes? How should I go about implementing this?