Dela via


SpaApplicationBuilderExtensions.UseSpa Method

Definition

Handles all requests from this point in the middleware chain by returning the default page for the Single Page Application (SPA).

This middleware should be placed late in the chain, so that other middleware for serving static files, MVC actions, etc., takes precedence.

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))

Parameters

configuration
Action<ISpaBuilder>

This callback will be invoked so that additional middleware can be registered within the context of this SPA.

Applies to