title: angularjs custom directive with custom attributes
body: <p>I'm new to angularjs and I don't know if this is possible and if possible how to implement it.
  I want to create a custom directive with a controller that uses information passed to it through attributes. This is a non working example of what I want to implement:</p>
  
  <p>The HTML should look like:</p>
  
  <pre><code>&lt;div ng-app="test"&gt;
      &lt;custom-directive attr1="value1" attr2="value2"&gt;&lt;/custom-directive&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And the js:</p>
  
  <pre><code>   var app = angular.module('test', [ ]);
      app.directive("customDirective", function(){
          return {
              restrict: 'E',
              scope: ???,
              controller: function(){
                  console.log("print attributes value: " + attr1 + ", " +  attr2 );
              }
          }
      };
  });
  </code></pre>
  
  <p>And the expect console output should be:</p>
  
  <blockquote>
    <blockquote>
      <p>print attributes value: value1, value2</p>
    </blockquote>
  </blockquote>
  
  <p>Any idea?
  Thanks!</p>