title: How to expose a public API from a directive that is a reusable component?
body: <p>Having a directive in angular that is a reusable component, what is the best practice to expose a public API that can be accessed from the controller?
  So when there are multiple instances of the component you can have access from the controller</p>
  
  <pre><code>angular.directive('extLabel', function {
      return {
          scope: {
              name: '@',
              configObj: '='
          },
          link: function(scope, iElement, iAttrs) {
              // this could be and exposed method
              scope.changeLabel = function(newLabel) {
                  scope.configObj.label = newLabel;
              }
          }
      }
  });
  </code></pre>
  
  <p>Then when having:</p>
  
  <pre><code>&lt;ext-label name="extlabel1" config-obj="label1"&gt;&lt;/ext-label&gt;
  &lt;ext-label name="extlabel2" config-obj="label2"&gt;&lt;/ext-label&gt;
  &lt;ext-label name="extlabel3" config-obj="label3"&gt;&lt;/ext-label&gt;
  </code></pre>
  
  <p>How can I get the access the scope.changeLabel of extLabel2 in a controller?</p>
  
  <p>Does it make sense?</p>