I have added the page title tags on every component
<PageTitle>My Page Title</PageTitle>
but that's not working browser tab is showing default URL of the page.
Where are the settings which need to change.
Hi Usman Jalil,
Thank you for reaching out to us.
Not sure which approach you are trying to use. I think the easiest way to set the page title is throw javascript, you can add a new js function that sets a page title and then trigger this function from your blazor page view.
Function in global scope.
function BlazorSetTitle(title) {
document.title = title;
}
@inject IJSRuntime JS
@code{
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await JS.InvokeVoidAsync("BlazorSetTitle", "Page Title");
}
}