could you please tell me how to scroll the list to top on button click in angular ? I tried like this
scrollToTop(el){
el.scrollIntoView();
}
<button (click)="scrollToTop(target)">scroll to top</button>
It scroll the list to top .but it hide my addressbar
and then user not able see header
I think it is not a good solution .anybody have any other good solution
here is my code https://stackblitz.com/edit/angular-f9qxqh?file=src%2Fapp%2Fapp.component.html