Usually, I use something like this:
$scope.scrollDown = function(){
$location.hash('bottom');
$anchorScroll();
}
While this method works fine in most cases, I've encountered an issue when fetching data for an ng-repeat and trying to resize the view once the data is loaded.
For example (in the controller):
users.fetch({userList:$routeParams.conversationId}, function(data){
$scope.userList = data;
$scope.scrollDown();
})
The scrollDown function executes too quickly, before the ng-repeat has finished populating the $scope.userList that it relies on to build its table.
I'm looking for a way to trigger scrollDown after the list has been updated or modified. Any suggestions on how to achieve this would be greatly appreciated!
Many thanks!