-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing one
Milestone
Description
This issue is to track routing features we're likely to want to add in the future:
- Review exactly which parameter constraints we really want to support. For example maybe add
regex
; maybe removebool
or limit the set ofdatetime
formats more precisely. See Basic route constraints (:int, etc.) blazor#295 for more discussion. - Catch-all segments (e.g.,
/products/{*categoryAndName}
) - 404 handler (it's probably not enough just to have a component that matches
/{*anythingElse}
, because for SSR you'd want to know it's really not a match so you could actually return a 404) - Done! - Simple method for accessing querystring/hash values (e.g., via new properties on
IUriHelper
) - Multiple nested routers
- Outbound URL generation (e.g.,
<a page=@About>About us</a>
, or perhaps just by codegenning methods like<a href=@Products.Url(53)>Duck boots</a>
for each@page
declaration) - In the
@page
directive, allow the use of compile-time constant expressions, not just literal strings (e.g., https://github.com/aspnet/blazor/issues/1363). - Optional route parameters
Also the items from dotnet/blazor#636 that were not yet finalised:
- Discover
[Route]
attributes on types in referenced assemblies that themselves referenceMicrosoft.AspNetCore.Blazor
transitively - Discover
[Route]
attributes on component base classes (i.e., inherit=true) - In the
Router
component, make it simple to subclass and override a virtual method to change the logic for locating theIComponent
for a given URL. Currently there's no virtual method for this. - Make
RouteTable
'sRoutes
propertyget
-only - Cache route tables per assembly
srowan, kotx and SindelarPetr
Metadata
Metadata
Assignees
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing one