Previous tip (One-way binding) Next tip (Route parameters) >>

Link to your components

You can make your Blazor component’s “routable” using the @page directive.

The value you specify for the @page directive is known as a ‘Route Template’.

You can specify multiple @page directives (route templates) for a component if you want multiple routes to be directed to it.

// navigating to either of these routes
// will render this component in the browser
@page "/Contact"
@page "/GetInTouch"
<h1>Contact Us!</h1>