共用方式為


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 的內容中註冊其他中介軟體。

適用於