0

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")
aaron
  • 39,695
  • 6
  • 46
  • 102
Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197

1 Answers1

0

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>
aaron
  • 39,695
  • 6
  • 46
  • 102
  • Will be fixed in template v3.8: [aspnetboilerplate/module-zero-core-template#245](https://github.com/aspnetboilerplate/module-zero-core-template/pull/245) – aaron May 22 '18 at 04:11