title: AngularJS directive - template is being fully compiled
body: <p>I have a problem with binding classes inside my directive, looks like they are not being compiled correctly. <strong>Please note that, I was unable to reproduce this with bare-bone app, but below is short description of what is going on.</strong></p>
  
  <p><a href="http://jsfiddle.net/pqwLaeeh/20/" rel="nofollow">JFFiddle - with attributes</a><br />
  <a href="http://jsfiddle.net/srnpp2Le/1/" rel="nofollow">JSFiddle - without attributes</a> </p>
  
  <p><strong>Demo with attributes works OK</strong>, but the <strong>without attributes does not work</strong> in my real app, unfortunately I was unable to <strong>reproduce the issue</strong>. It actually work OK <strong>when my app is very small</strong>, does it might have something to do with it rendering speed? (i.e. compiler was able to compile this just because it was quick enough?)</p>
  
  <p>I will do my best to describe what is going on, without creating specific attributes, should look like:</p>
  
  <p>directive: <br />
  <code>&lt;div txt-directive&gt;</code><br /></p>
  
  <p>template:<br />
  <code>&lt;div class="class-{{bg}} class-{{color}}"&gt;{{ txt }}&lt;/div&gt;</code><br /></p>
  
  <p>result should be:<br />
  <code>&lt;div class="class-bg class-color"&gt;Lorem ipsum dolor sit amet.&lt;/div&gt;</code><br /></p>
  
  <p>instead I get half uncompleted version of it:<br />
  <code>&lt;div class="class-{{bg}} class-{{color}}"&gt;Lorem ipsum dolor sit amet.&lt;/div&gt;&lt;br /&gt;</code></p>
  
  <p>Also, I noticed that when I use <code>ng-class</code>, the result is:<br />
  <code>&lt;div ng-class="class-{{bg}} class-{{color}}" class="ng-binding"&gt;Lorem ipsum dolor sit amet.&lt;/div&gt;</code></p>
  
  <p>Looks like AngularJS compiler have not touched the ng-class at all. I am thinking this has something to do with the directive compile function, but I am too thick to figure this out.</p>
  
  <p>As per above, the content is compiled OK, but the classes are left as expressions.
  Any suggestions much appreciated.</p>