title: Use Angular Directive attributes in its template
body: <p>How can I use the value of an attribute in a directive? My element looks like this:</p>
  
  <pre><code>&lt;div class="tooltip-icon" 
    data-my-tooltip="click" 
    data-tooltip-title="foo" 
    data-tooltip-content="test content"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I would like to use that in the template of my directive, which looks like this:</p>
  
  <pre><code>mainApp.directive('myTooltip',
      function() {
  
          // allowed event listeners
          var allowedListeners = ["click"];
  
          return {
              restrict: 'A',
              template:   '&lt;div class="tooltip-title"&gt;...&lt;/div&gt;' +
                          '&lt;div class="tooltip-content"&gt;' +
                          '...&lt;/div&gt;',
              link: function(scope, elm, attrs) {
                  if(allowedListeners.indexOf(attrs.myTooltip) != -1){
                      elm.bind(attrs.myTooltip, function(){
                          ...
                      });
                  }
  
              }
          };
      }
  );
  </code></pre>
  
  <p>Where the triple dots are there should be code, but I cannot figure out how to get the contents of the attrs object (<code>attrs.tooltipTitle</code>, etc) into that template.</p>