Another way to do it in Angular:
Markup:
<textarea #inputMessage></textarea>
Add ViewChild()
property:
@ViewChild('inputMessage')
inputMessageRef: ElementRef;
Scroll anywhere you want inside of the component using scrollIntoView()
function:
this.inputMessageRef.nativeElement.scrollIntoView();