title: Communication between functions having their own scopes
body: <p>I am working on a Website where a part of it, a page generator, was written by another guy. This part of code prepares its HTML in the template cache and has several functions that access complex widgets in this HTML page. Each complex widget has its own controllers as separated functions. The code is of the form :</p>
  
  <pre><code>(function (app) {
      try {
          app = angular.module(SGGenerator + '.templates');
      } catch (error) {
          app = angular.module(SGGenerator + '.templates', []);
      }
  
      app.run(["$templateCache", function ($templateCache) {
          $templateCache.put("ivm-color-picker/templates/color-picker-field.html",
              "&lt;label class=\"item item-input item-has-button-right\"&gt;\n" +
              […]
              "&lt;/a&gt;");
      }]);
  })();
  (function () {
      var controllerName = 'ServerController', moduleName = 'ivmServer';
  
      angular.module(moduleName, ['ionic'])
          .controller(controllerName, function ($scope) {
              […]
              $scope.startPage2Server = function ($scope) {
              […]
              };
          }).directive(moduleName, function () {
              […]
          }
      })
  }());   // ServerController
  (function () {
      var controllerName = 'IconPickerController', moduleName = 'ivmIconpicker';
  
      angular.module(moduleName, ['ionic'])
          .controller(controllerName, function ($scope, $ionicPopover, $http) {
              […]
      })
      .directive(moduleName, function () {
          return {
              controller: controllerName,
              restrict: 'E',
              scope: {
                  ngModel: '=',
                  label: '@'
              },
              templateUrl: 'ivm-icon-picker/templates/icon-picker-field.html'
          }
      })
  }());   // IconPickerController
  </code></pre>
  
  <p>etc. What I need is something like a "common scope" for them so that data exchange is easily possible. What is your solution for this problem? I do not want to communicate with the server for some "global" variable contents.</p>