From 78efc77be47b710868ce0994299fee921a1afae5 Mon Sep 17 00:00:00 2001 From: SteveSandersonMS Date: Wed, 9 Dec 2015 15:17:31 +0000 Subject: [PATCH] Use MapSpaFallbackRoute in ReactServices and demo --- Microsoft.AspNet.ReactServices/project.json | 3 ++- samples/react/ReactGrid/Controllers/HomeController.cs | 3 +-- samples/react/ReactGrid/Startup.cs | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Microsoft.AspNet.ReactServices/project.json b/Microsoft.AspNet.ReactServices/project.json index c6904f2..98cf6eb 100644 --- a/Microsoft.AspNet.ReactServices/project.json +++ b/Microsoft.AspNet.ReactServices/project.json @@ -26,7 +26,8 @@ }, "dependencies": { "Microsoft.AspNet.NodeServices": "1.0.0-alpha7", - "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-*" + "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-*", + "Microsoft.AspNet.SpaServices": "1.0.0-alpha7" }, "resource": [ "Content/**/*" diff --git a/samples/react/ReactGrid/Controllers/HomeController.cs b/samples/react/ReactGrid/Controllers/HomeController.cs index 4a9899c..14063a5 100755 --- a/samples/react/ReactGrid/Controllers/HomeController.cs +++ b/samples/react/ReactGrid/Controllers/HomeController.cs @@ -1,11 +1,10 @@ -using System.Threading.Tasks; using Microsoft.AspNet.Mvc; namespace ReactExample.Controllers { public class HomeController : Controller { - public IActionResult Index(int pageIndex) + public IActionResult Index() { return View(); } diff --git a/samples/react/ReactGrid/Startup.cs b/samples/react/ReactGrid/Startup.cs index 0279cf6..244bbfe 100755 --- a/samples/react/ReactGrid/Startup.cs +++ b/samples/react/ReactGrid/Startup.cs @@ -58,9 +58,8 @@ namespace ReactExample // Add MVC to the request pipeline. app.UseMvc(routes => { - routes.MapRoute( + routes.MapSpaFallbackRoute( name: "default", - template: "{pageIndex?}", defaults: new { controller="Home", action = "Index" }); }); }