(function () { "use strict"; var streamApp = angular.module('streamApp'); streamApp.directive('viewersDropDirective', ['groupsService', ViewersDropDirective]); function ViewersDropDirective(groupsService, userService, timeService) { return { restrict: 'E', scope: { dropId: '@' }, templateUrl: '/App/Directives/viewersDropDirective/viewersDropDirective.html?v=6.0.0c', link: function (scope, element, attrs, tabsCtrl) { scope.message = ['To share a memory with a person, you need share that memory with with a Group.', 'Manage your Groups.']; scope.updateViewers = function(dropId) { scope.viewed = !scope.viewed; if (scope.dropId) { groupsService.getViewersDrop(scope.dropId).then(function (data) { scope.viewers = data.data; }); } else { scope.viewers = []; } } } }; } }());