Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module('promarketApp')
- .directive('chatBody', ($rootScope, feedUtils) ->
- restrict: 'E'
- templateUrl: 'views/directives/chat-body.html'
- scope: {
- feedItems: '='
- }
- link: (scope, element, attrs) ->
- scope.loggedIn = $rootScope.loggedIn
- scope.$roomId = $rootScope.$roomId
- console.log feedUtils.calculateDateStamps(scope.feedItems)
- stopWatching = scope.$watch 'feedItems', (newValue) ->
- if newValue?
- scope.dateStamps = feedUtils.calculateDateStamps(scope.feedItems)
- stopWatching()
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement