How can I make sure that when there's a click on a router link within the <app-navbar> component, the browser will scroll down to the router outlet ?
This is what my app.component.html looks like at the moment:
<div class="container-fluid h-100">
<app-navbar></app-navbar>
<div class="row h-100">
<app-header class="h-100 overflow-auto col-md-12 col-lg-5"></app-header>
<div id="main" class="h-100 overflow-auto col-md-12 col-lg-7">
<router-outlet #o="outlet"></router-outlet>
</div>
</div>
</div>
the <app-navbar>contains router-links and the <app-header>takes up 100% of the height on mobile. So I want to make sure that whenever a user clicks on a link in the navbar, the page scrolls down to the newly loaded component under the <app-header>
I had a look at this library : https://www.npmjs.com/package/ngx-page-scroll but couldn't manage to make it scroll (I suppose because I was trying to scroll to an element of a different component).
Just when I was about to edit this message I found this library : https://www.npmjs.com/package/angular-scroll but same thing, I am not sure how to make it work.
smoothscroll in a couple of them....