Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. angular.module('promarketApp')
  2. .directive('chatBody', ($rootScope, feedUtils) ->
  3. restrict: 'E'
  4. templateUrl: 'views/directives/chat-body.html'
  5. scope: {
  6. feedItems: '='
  7. }
  8.  
  9. link: (scope, element, attrs) ->
  10. scope.loggedIn = $rootScope.loggedIn
  11. scope.$roomId = $rootScope.$roomId
  12.  
  13. console.log feedUtils.calculateDateStamps(scope.feedItems)
  14. stopWatching = scope.$watch 'feedItems', (newValue) ->
  15. if newValue?
  16. scope.dateStamps = feedUtils.calculateDateStamps(scope.feedItems)
  17. stopWatching()
  18. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement