Skip to content

[Blazor] Double routing not working #10686

Closed
@ichensky

Description

@ichensky
  1. Create page(change a little bit from basic blazor web app template) that accept several routes:
@page "/fetchdata"
@page "/fetchdata/{page:int}"

and implement simple pagination(several buttons that implement onclick event, which change number of elements of WeatherForecast[] arr and call then UriHelper.NavigateTo($"/fetchdata/{page}"))

  1. Lunch app, go from menu to the page /fetchdata, then to the pages: /fetchdata/1, fetchdata/3, /fetchdata/5, etc routing works ok, page rendered, data changed at page and url in browser.
  2. If you try to go from page (with number), for ex. /fetchdata/5 to the page: /fetchdata (click on menu item)->
    url in browser will be changed as expected, but page wouldn't be rendered(changed).
    --
    If you go from page for ex. /fetchdata/5 to the page: /fetchdata/0 url in browser will be changed and page will be rendered as expected.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions