Skip to content

Blazor issue with routing and - separator #49691

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
Julien-Marpault opened this issue Jul 27, 2023 · 2 comments
Closed

Blazor issue with routing and - separator #49691

Julien-Marpault opened this issue Jul 27, 2023 · 2 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-routing
Milestone

Comments

@Julien-Marpault
Copy link

Julien-Marpault commented Jul 27, 2023

.Net 8 Preview 6 - Blazor WASM

@page "/account/onboarding/step/{Number}"
This route format is working as expected, but this one doesn't:

@page "/account/onboarding/step-{Number}"

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Invalid template 'account/onboarding/step-{Number}'. Missing '{' in parameter segment 'step-{Number}'.
System.InvalidOperationException: Invalid template 'account/onboarding/step-{Number}'. Missing '{' in parameter segment 'step-{Number}'.
   at Microsoft.AspNetCore.Components.Routing.TemplateParser.ParseTemplate(String template)
   at Microsoft.AspNetCore.Components.RouteTableFactory.Create(Dictionary`2 templatesByHandler)
   at Microsoft.AspNetCore.Components.RouteTableFactory.Create(List`1 componentTypes)
   at Microsoft.AspNetCore.Components.RouteTableFactory.Create(RouteKey routeKey)
   at Microsoft.AspNetCore.Components.Routing.Router.RefreshRouteTable()
   at Microsoft.AspNetCore.Components.Routing.Router.Refresh(Boolean isNavigationIntercepted)
   at Microsoft.AspNetCore.Components.Routing.Router.RunOnNavigateAsync(String path, Boolean isNavigationIntercepted)
   at Microsoft.AspNetCore.Components.Routing.Router.<>c__DisplayClass75_0.<RunOnNavigateAsync>b__1(RenderTreeBuilder builder)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Jul 27, 2023
@javiercn
Copy link
Member

@Julien-Marpault we currently don't support complex segments.

This is addressed by the following PR
#49622

@mkArtakMSFT mkArtakMSFT added feature-routing bug This issue describes a behavior which is not expected - a bug. labels Jul 31, 2023
@mkArtakMSFT mkArtakMSFT added this to the .NET 8 Planning milestone Jul 31, 2023
@mkArtakMSFT mkArtakMSFT modified the milestones: .NET 8 Planning, 8.0-rc1 Jul 31, 2023
@dotnet dotnet deleted a comment Jul 31, 2023
@danroth27
Copy link
Member

@javiercn Can this now be closed as done? Or is there more to be done here?

@danroth27 danroth27 modified the milestones: 8.0-rc1, 8.0-rc2 Aug 16, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-routing
Projects
None yet
Development

No branches or pull requests

4 participants