I have a button on the top of a table. When user clicks that button, user should be able landed to the section 2 in the second page.
I tried as below but it's going only to that page, not landing to the section 2 div element Can someone explain how can I achieve this?
.firstPage.ts
addLease(){
this.router.navigateByUrl('/secondPage/' + this.id);
}
.firstPage.html
<button class="btn btn-primary btn-sm ms-2" (click)="addLease()"> Lease Comp </button>
secondPage.html
<div #container>
............
<div id="section1">
.......
</div>
<div id="section2">
....
</div>
</div>