css - AngularJS scroll down initial -


i have following div container:

<div class="col-md-8 grid-wrapper-div chathistory"> ... </div> 

with css:

.chat .chathistory {     overflow-y:scroll;     height: 550px; } 

and if page loaded scroll bar should @ bottom -> use angularjs. there possibility scroll down css or angularjs

[edit]

i have tried chathistorycontainer.scrollheight undefined. know why? debug

use nginit, runs upon rendering content , $timeout postpone scrolling next digest cycle in order wait content rendered completely.

<div id="chat_history" class="col-md-8 grid-wrapper-div chathistory" ng-init="scrolltobottom()"> ... </div>  myapp   .controller(function($scope, $timeout){     $scope.scrolltobottom = function() {       $timeout(function(){         var objdiv = document.getelementbyid("chat_history");         objdiv.scrolltop = objdiv.scrollheight;       });     };   }); 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -