Want to go to top of the page on button click , Currently I using following code which is not working :
HTML:
<button md-raised-button class="md-raised md-primary" (click)="onEdit()">Edit</button>
Function:
onEdit(){
window.scrollTo(0,0);
}
onEdit(){
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With