SpaApplicationBuilderExtensions.UseSpa 方法

定义

通过返回单页应用程序 (SPA) 的默认页,处理中间件链中此点的所有请求。

此中间件应放置在链的后期,以便优先处理静态文件、MVC 操作等的其他中间件。

public:
[System::Runtime::CompilerServices::Extension]
 static void UseSpa(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Action<Microsoft::AspNetCore::SpaServices::ISpaBuilder ^> ^ configuration);
public static void UseSpa (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.SpaServices.ISpaBuilder> configuration);
static member UseSpa : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.SpaServices.ISpaBuilder> -> unit
<Extension()>
Public Sub UseSpa (app As IApplicationBuilder, configuration As Action(Of ISpaBuilder))

参数

configuration
Action<ISpaBuilder>

将调用此回调,以便可以在此 SPA 的上下文中注册其他中间件。

适用于