Add example of full-page prerendering via a custom action result

This commit is contained in:
SteveSandersonMS
2016-07-19 15:50:54 +01:00
parent edf1f88398
commit 749c7cb3ce
8 changed files with 115 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SpaServices.Prerendering;
namespace Webpack.ActionResults
{
public static class PrerenderResultExtensions
{
public static PrerenderResult Prerender(this ControllerBase controller, JavaScriptModuleExport exportToPrerender, object dataToSupply = null)
{
return new PrerenderResult(exportToPrerender, dataToSupply);
}
}
}