Scroll to element on click in Angular 4

后端 未结 12 1006
逝去的感伤
逝去的感伤 2020-11-29 18:57

I want to be able to scroll to a target when a button is pressed. I was thinking something like this.

12条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 19:30

    I have done something like what you're asking just by using jQuery to find the element (such as document.getElementById(...)) and using the .focus() call.

提交回复
热议问题