Skip to content

Support optional parameters in blazor routing #10759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ichensky opened this issue Jun 3, 2019 · 2 comments
Closed

Support optional parameters in blazor routing #10759

ichensky opened this issue Jun 3, 2019 · 2 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one help wanted Up for grabs. We would accept a PR to help resolve this issue

Comments

@ichensky
Copy link

ichensky commented Jun 3, 2019

Routing with nulable types not working.

  1. Create blazor page.
  2. Add route 'fetchdata/{page:int?}'
    There will be an exception:
Invalid template 'fetchdata/{page:int?}'. 
The character '?' in parameter segment '{page:int?}' is not allowed.

Also it is not possible create "double routing" like in the issue #10686

@Eilon Eilon added the area-blazor Includes: Blazor, Razor Components label Jun 3, 2019
@mkArtakMSFT mkArtakMSFT added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label Jun 4, 2019
@mkArtakMSFT mkArtakMSFT changed the title [Blazor]: Routing like 'fetchdata/{page:int?}' not working Support optional parameters in blazor routing Jun 4, 2019
@mkArtakMSFT mkArtakMSFT added this to the 3.1.0 milestone Jun 4, 2019
@mkArtakMSFT mkArtakMSFT added good first issue Good for newcomers. help wanted Up for grabs. We would accept a PR to help resolve this issue and removed good first issue Good for newcomers. labels Jun 4, 2019
@SteveSandersonMS
Copy link
Member

Note: when we do this, we need to make sure it supplies null for any omitted optional parameters for consistency with #12407.

@captainsafia
Copy link
Member

Closing this as it has been implemented in #19733.

@captainsafia captainsafia added the Done This issue has been fixed label Apr 1, 2020
@ghost ghost locked as resolved and limited conversation to collaborators May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one help wanted Up for grabs. We would accept a PR to help resolve this issue
Projects
None yet
Development

No branches or pull requests

6 participants