I'm doing a navigation menu, in which I use angular.navigate router, which works correctly. However, I do not know how to do it so that when I click on the first element of the navigation bar, I will go to the page and scroll to a div that I have.
Here my code:
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
<ul class="ulderecho nav navbar-nav">
<li style="border: none;">
<a (click)="this.router.navigate(['/contactanos']">Ayuda</a>
</li>
<li style="border: none;">
<a (click)="this.router.navigate(['/inicio'])">Inicio</a>
</li>
</ul>
</div>
As you can see I have two elements called help and init which are directed to two web pages that I already have done.
When you click on Help, in addition to being directed to the help page, I want you to scroll to a div that is in the middle of the help page, this div is called "helpDiv".
How can I add the scroll to the navigation path.