Skip to content

Blazor (Server-Side) component not refreshing on navigation with multiple routes #12232

Closed
@audacity76

Description

@audacity76

Describe the bug

If a razor component has optional parameters (multiple routes) it does not refresh if navigating from the component with parameter to the component without parameter.

To Reproduce

Steps to reproduce the behavior:

  1. Using this version of ASP.NET Core ASP.NET Core 3.0.0-preview6.19307.2
  2. Run this razor component
@page "/about"
@page "/about/{Who}"

<h1>About @(Who ?? "us")</h1>

<a href="/about">about us</a> | <a href="/about/you">about you</a> | <a href="/about/me">about me</a>

@code {
    [Parameter]
    public string Who { get; set; }
}
  1. With these arguments /about. Click on about you. Click on about us.
  2. No refresh when navigating to about us

Expected behavior

It should refresh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions