25 lines
1.2 KiB
Plaintext
25 lines
1.2 KiB
Plaintext
@using Microsoft.AspNetCore.Blazor.Routing
|
|
@inject Microsoft.AspNetCore.Blazor.Services.IUriHelper uriHelper
|
|
<style type="text/css">a.active { background-color: yellow; font-weight: bold; }</style>
|
|
<ul>
|
|
<li><NavLink href="/subdir/" Match=NavLinkMatch.All>Default (matches all)</NavLink></li>
|
|
<li><NavLink href="" Match=NavLinkMatch.All>Default with base-relative URL (matches all)</NavLink></li>
|
|
<li><NavLink href="/subdir/?abc=123">Default with query</NavLink></li>
|
|
<li><NavLink href="/subdir/#blah">Default with hash</NavLink></li>
|
|
<li><NavLink href="/subdir/Other">Other</NavLink></li>
|
|
<li><NavLink href="Other" Match=NavLinkMatch.All>Other with base-relative URL (matches all)</NavLink></li>
|
|
<li><NavLink href="/subdir/Other?abc=123">Other with query</NavLink></li>
|
|
<li><NavLink href="/subdir/Other#blah">Other with hash</NavLink></li>
|
|
<li><NavLink href="/subdir/WithParameters/Name/Abc/LastName/McDef">With parameters</NavLink></li>
|
|
</ul>
|
|
|
|
<button onclick=@(x => uriHelper.NavigateTo("Other"))>
|
|
Programmatic navigation
|
|
</button>
|
|
|
|
<a id="anchor-with-no-href">
|
|
Anchor tag with no href attribute
|
|
</a>
|
|
|
|
<a href="/" target="_blank">Target (_blank)</a>
|