0
Angular 2アプリを構築しています。
プロジェクトは、Visual Studio 2017を使用して開始され、私はできエリア(Home2017 /スタート/ Index.cshtml)内部のアプリに成功したルート:角度2 + MVCルーティング:フォールバック後にルーティングが失敗する
Route toHome2017 = null;
toHome2017 = routes.MapRoute(
name: "Default_to_Home2017",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Start", action = "Index", id = UrlParameter.Optional },
namespaces: new string[] { "BIP2.Areas.Home2017.Controllers" }
);
toHome2017.DataTokens["area"] = "Home2017";
角度ルーティングは次のとおりです。
/Architectureに移動すると、角度ルーティングが機能しています。しかし
、私はページを更新し、使用してHome2017 /スタート/インデックスにリダイレクト:角度のパスを、アプリケーションがロードされる
toHome2017 = routes.MapRoute(
name: "Default_to_Architecture",
url: "Architecture",
defaults: new { controller = "Start", action = "Index", id = UrlParameter.Optional },
namespaces: new string[] { "BIP2.Areas.Home2017.Controllers" }
);
toHome2017.DataTokens["area"] = "Home2017";
をが、:「」StartpageComponentとがURLで表示されます/建築/。
私には何が欠けていますか?
EDIT:同じ手法がわかりましAngularJS