I'm using ASP.NET Boilerplate. I want to navigate to Home page when I click on Application logo. But I cannot find any method to change its click behavior.
topbar.component.html
<a class="navbar-brand" asp-controller="Home" asp-action="Index"><i class="fa fa-cubes"></i> Application Name</a>
I want a similar behavior like when you click on side menu items.
sidebar-nav.component.ts
new MenuItem(this.l("HomePage"), "", "home", "/app/home")
asp-controller
and asp-action
are Tag Helpers in ASP.NET Core.
For an Angular component, use the routerLink
attribute:
<a routerLink="/app/home" class="navbar-brand"><i class="fa fa-cubes"></i> Application Name</a>