title: Share variable in angular directives
body: <p>I have few directives like </p>
  
  <pre><code>app.directive('navContent', function() {
  return {
      restrict: 'E',
      scope: {
          content: "="
      },
      templateUrl: '../../' + template + '/regions/nav.html',
  }
  });
  
  
  app.directive('headerContent', function() {
  return {
      restrict: 'E',
      scope: {
          content: "="
      },
      templateUrl: '../../' + template + '/regions/header.html',
  }
  });
  </code></pre>
  
  <p>all need a template var in templateURL. </p>
  
  <p>I have tried with a function without success</p>
  
  <pre><code>var siteID = angular.element('head').data('site-id');
  $http.get('/api/sites/' + siteID)
      .success(function(site) {
          var template = site.template;   
         })
      .error(function(data) {
          console.log('Error: ' + data);
      });
  };
  </code></pre>
  
  <p>siteID is in DOM:</p>
  
  <pre><code>&lt;head data-site-id="123456"&gt;
  </code></pre>
  
  <p>and site.template should return template from Site model</p>
  
  <p>Any help would be appreciated</p>