angular page scroll to next section code example
Example: smooth scroll in viewportscroller
//HTML
<button (click)="scrollToElement(target)"></button>
<div id="target" #target>Your target</div>
//Ts code :
scrollToElement($element): void {
console.log($element);
$element.scrollIntoView({behavior: "smooth", block: "start", inline: "nearest"});
}