From 2beb5600679ee83c9af71fdb97fc77d83e8ce83c Mon Sep 17 00:00:00 2001 From: Marcello Lamonaca Date: Sun, 28 Nov 2021 18:08:10 +0100 Subject: [PATCH] Add details on component route parameters --- DotNet/ASP.NET/Blazor.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DotNet/ASP.NET/Blazor.md b/DotNet/ASP.NET/Blazor.md index f228c8a..4edf2d7 100644 --- a/DotNet/ASP.NET/Blazor.md +++ b/DotNet/ASP.NET/Blazor.md @@ -225,7 +225,9 @@ Project [Blazor Components](https://docs.microsoft.com/en-us/aspnet/core/blazor/components/) ```cs -@page "/route/{RouteParameter?}" // make component accessible from a URL (optional) +@page "/route/{RouteParameter}" // make component accessible from a URL +@page "/route/{RouteParameter?}" // specify route parameter as optional +@page "/route/{RouteParameter:}" // specify route parameter type @namespace // set the component namespace @using // using statement