We can make use of JS Interop to open a URL in new tab.
public async Task NavTo(string url, bool isNewTab)
{
if (isNewTab)
{
await JSRuntime.InvokeAsync<object>("open", url, "_blank");
}
else
{
NavManager.NavigateTo(url);
}
}
Share with