Use MapSpaFallbackRoute in ReactServices and demo

This commit is contained in:
SteveSandersonMS
2015-12-09 15:17:31 +00:00
parent d4f04d211f
commit 78efc77be4
3 changed files with 4 additions and 5 deletions

View File

@@ -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();
}

View File

@@ -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" });
});
}