Scroll to an element within another component in Angular 4

0

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?

    
asked by Andrea Fernandez 21.03.2018 в 23:14
source

0 answers