Share data between directives in AngularJS 1x?

Today I need to share data between 2 directives in AngularJS 1x, using angular.copy the beerservice can be inject into each directive. (function(){ var app = angular.module(‘danyApp’,[]); app.controller(“homeController”,function($scope,beerService ){ $scope.title = “hello app”; angular.copy([ { name: ‘dany’} , { name: ‘mgarocks’ } ], beerService.elements); }) app.directive(‘beer1’, function(beerService){ return { restrict: ‘E’, template: ‘<h3>Beer 1</h3>’ +…