how to scroll left and right on click in angular 8 code example
Example 1: angular scroll to element horizontally
scrollLeft(){
this.widgetsContent.nativeElement.scrollLeft -= 150;
}
scrollRight(){
this.widgetsContent.nativeElement.scrollLeft += 150;
}
Example 2: angular scroll to element horizontally
@ViewChild('widgetsContent') widgetsContent: ElementRef;