Blog - Index
Matched /blog/{action=Index} - a default-valued route parameter.
- action
- Index
- came from
- the template default (URL omitted the segment)
Defaults vs. optionals
{action=Index} is omittable like {action?}, but the parameter never
binds null - the missing segment binds "Index". URL generation
mirrors this: ResolveUrl and the source-generated
BrouterRoutes.BlogByAction() emit the default when you don't pass a value, so
generated URLs always round-trip. A parameter can't be optional and defaulted
({id=5?} throws at parse time, framework parity).
@* /blog โ action = "Index" (the default) /blog/archive โ action = "archive" Typed default: {id:int=5} binds int 5, not the string "5". *@ <Broute Path="/blog/{action=Index}" Component="@typeof(BlogPage)" />