title: Bind to attributes in prototypically inherited scope
body: <p>I'd like to create a directive, with a prototypically inherited scope (i.e. <em>scope=true</em>), but also set up scope binding to attributes, similar to following when setting up an isolated scope: </p>
  
  <pre><code>scope = {
  'varname':'=attrname'
  }
  </code></pre>
  
  <p>My current solution is to set <em>scope=true</em> and set up the binding to the attributes along the following lines in the <em>link</em> function:</p>
  
  <blockquote>
    <p>scope.$watch(element.attr('attrname'), function(val) { scope.varname =
    val; }); // watch changes scope.varname =
    scope.$eval(element.attr('attrname')); // initialize</p>
  </blockquote>
  
  <p>Although it does the trick it doesn't seem to be very elegant. What approach do you suggest?</p>
  
  <p>I find it surprising angularjs seems to expect that in a directive you wouldn't need attribute binding when setting up a new inherited scope.</p>