0
我想angularjs路由在我的MVC应用程序整合......在这一刻我已经写了没有关于角路由代码...我刚才添加的标签当我添加基础标签MVC路由的推移循环
<base href="/" />
而我运行我的MVC应用程序...它已停止工作。
在这里,我是如何配置我的MVC的路由:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
我也一个Services
区和路由配置INT是这样的:
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Services_default",
"Servizi/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
}
,当我浏览一个网址在该地区,应用程序在循环中。
例如,当我浏览/Servizi/Cpe
,调试汽车无停在了Index
行动CpeController
的:
public class CpeController : Controller
{
// GET: Services/Cpe
public ActionResult Index()
{
return View();
}
}
这是结果:
这就像页面不止一次显示。
为什么?你能帮我吗?