I am familiar with using something like:
$scope.gotoBottom = function(){
$location.hash('bottom');
$anchorScroll();
}
and it works. But what I see is a problem when retrieving the data that is used in ng snooze and when trying to resize when that data arrives.
Example (in the controller):
users.get({userList:$routeParams.conversationId}, function(data){
$scope.userList = data;
$scope.gotoBottom();
})
The gotoBottom method starts quickly, while ng-repeat looks at $ scope.userList and creates a table based on this.
I want to be able to switch gotoBottom after this list has been redone (or when it has been modified). Is there a better way to achieve this?
Thank!
source
share