I am scrolling an element of a component different from where my button is located. I'm using the library ng2-smooth-scroll
My button is <app-button-view>
and the div where I want to arrive with the scroll is in <app-home-view>
but at the end these two views are shown on the same page.
My button is this
<button class="btn btn-enlace" scrollTo="sectionA" duration="1800"(click)="onClick()">Ver contabilidad</button>
My div is this
<div id="sectionA"></div>
Try putting a button in the same view and if it does the functionality. How can I make my button see the id of my div?