Angularjs : Show the count of new messages -
i working on chat application , there want show count of new messages.
<div class="people" > <div ng-repeat="user in allcompanyusers"> <div class="person" ng-click="activatechat(user); bubble=true" id="chat_{{user.id}}"> <img alt="" /> <span class="name" >{{user.firstname}} {{user.lastname}} <span ng-if="!bubble" class="noti_bubble">{{count}}</span></span> <span class="preview"></span> </div> </div> </div> <div class="chat active-chat"> <div ng-repeat="c in activeconversations track c.time| orderby:'time':false"> <div class="bubble" ng-class="c.type"> {{c.message}} <span class="user_message">{{c.time | date:'yyyy-mm-dd hh:mm:ss'}}</span> </div> </div> </div>
any kind of appreciated , in advance...
you can use {{activeconversations.length}}
in order length/count as:
<div class="people" > <div ng-repeat="user in allcompanyusers"> <div class="person" ng-click="activatechat(user); bubble=true" id="chat_{{user.id}}"> <img alt="" /> <span class="name" >{{user.firstname}} {{user.lastname}} <span ng-if="!bubble" class="noti_bubble">{{activeconversations.length}}</span></span> <span class="preview"></span> </div> </div> </div> <div class="chat active-chat"> <div ng-repeat="c in activeconversations track c.time| orderby:'time':false"> <div class="bubble" ng-class="c.type"> {{c.message}} <span class="user_message">{{c.time | date:'yyyy-mm-dd hh:mm:ss'}}</span> </div> </div> </div>
Comments
Post a Comment