9

Hi I'm creating a chat app with angularjs that autoscrolls down when a user messages another user. I'm not sure how to implement this as my chat window is a fixed ul element. I'm thinking I will need to implement a directive to do this (inboxmsg-scroll on the ul element)

Any help? thanks.

HTML

<ul class="chatting-window" inboxmsg-scroll>
    <li data-ng-repeat="messageinfo in messages">
        <div class="message-date">
            {{messageinfo[0]}}
        </div>
    </li>
</ul>
Krupesh Kotecha
  • 2,396
  • 3
  • 21
  • 40
user1424508
  • 3,231
  • 13
  • 40
  • 66

1 Answers1

14

angularjs-scroll-glue

An AngularJs directive that automatically scrolls to the bottom of an element on changes in it's scope.

Link: https://github.com/Luegg/angularjs-scroll-glue

Răzvan Flavius Panda
  • 21,730
  • 17
  • 111
  • 169