Adding a Route Parameter
Learn how to pass value in route as parameter in Razor components.
We'll cover the following...
Components can have multiple @page directives. We will add an @page directive to the Counter component that uses a parameter. We do this as follows:
- Return to Visual Studio.
- Open the
Pages\Counter.razorfile. - Add the following
@pagedirective to the
Ask