178
rated 0 times
[
185]
[
7]
/ answers: 1 / hits: 22281
/ 6 Years ago, fri, july 6, 2018, 12:00:00
I have a #content
div and a button component.
When I click the button, I want to scroll to the top of the #content div.
HTML:
<div id=content>
Loren ipsum
</div>
<div (click)=toTop($event)>top</div>
topscroll.component.ts:
export class TopscrollComponent implements OnInit {
constructor() { }
ngOnInit() { }
toTop(event){
...
}
}
More From » angular