在Startup.cs中,我有可用的代码:
app.Map("/ca", ca =>
{
ca.UseSpa(spa =>
{
spa.Options.SourcePath = "ClientApps/AngularApp";
spa.UseAngularCliServer(npmScript: "start");
});
});
我认为以下内容是相等的,但没有用:
app.MapWhen(ctx => ctx.Request.Path.StartsWithSegments("/ca"), ca =>
{
ca.UseSpa(spa =>
{
spa.Options.SourcePath = "ClientApps/AngularApp";
spa.UseAngularCliServer(npmScript: "start");
});
});
这是怎么了?