mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
Add example of full-page prerendering via a custom action result
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user