services.AddScoped();
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@using Microsoft.AspNetCore.Components.WebAssembly.Hosting
@using Microsoft.Extensions.DependencyInjection
@using System.Net.Http
@namespace MyNamespace.Client
@{
var returnUrl = $"{routeData.Page?.FullPath ?? "/"}{routeData.QueryString}";
var returnUrlWithFragment = $"{returnUrl}#{routeData.Fragment}";
}
Loading...
@if (routeData.PageType == null)
{
Sorry, there's nothing at this address.
}
else
{
}
Sorry, there's nothing at this address.
注意:在添加代码后,需要重启应用程序才能使更改生效。