title: What is the best way to conditionally apply attributes in AngularJS?
body: <p>I need to be able to add for example "contenteditable" to elements, based on a boolean variable on scope.</p>
  
  <p>Example use:</p>
  
  <pre><code>&lt;h1 attrs="{'contenteditable=\"true\"': editMode}"&gt;{{content.title}}&lt;/h1&gt;
  </code></pre>
  
  <p>Would result in contenteditable=true being added to the element if <code>$scope.editMode</code> was set to <code>true</code>.
  Is there some easy way to implement this ng-class like attribute behavior? I'm considering writing a directive and sharing if not.</p>
  
  <p><strong>Edit:</strong> 
  I can see that there seems to be some similarities between my proposed attrs directive and <a href="https://github.com/angular/angular.js/commit/55027132f3d57e5dcf94683e6e6bd7b0aae0087d#L1L233" rel="noreferrer">ng-bind-attrs, but it was removed in 1.0.0.rc3</a>, why so?</p>