This question already has an answer here:
I have a terms page in which included links on the top. The purpose of these links is to scroll to page element that belongs to.
Is there any way to do this dynamically from the component?
This question already has an answer here:
I have a terms page in which included links on the top. The purpose of these links is to scroll to page element that belongs to.
Is there any way to do this dynamically from the component?
Eventually there is a scrollTo() method that give you the ability to scroll to any coordinates you want.
In my component I have use the method like this:
scrollTo()
get an argument with the id of the element you want to scroll to.In my template: