My AngularJS application has a controller that contains a list with messages:
$scope.messages = []
This list is updated as the application launches. In the template, it is displayed as follows:
<div style="height: 200px; overflow: auto">
...
<li ng-repeat="msg in messages">{{msg}}</li>
...
But when more messages arrive than 200px, the scroll remains at the top.
How to automatically scroll to the bottom of a message list?
source
share