title: how will i change the color of a font based on a value using angularjs directives?
body: <p>I would like to create a directive that can change the font color of the text displayed on a span based on some value that is not displayed.<br/> I have an array: <br/></p>
  
  <pre><code> $scope.due =[{somedate: "April.8.2010"}, {past:"yes"}];
  </code></pre>
  
  <p>If the value of "past " is yes, then the value inside the span: <code>&lt;span&gt;{{somedue.date}}&lt;/span&gt;</code> will be color red, else if "past" is no, then font color is black. I am new with angularjs so i would appreciate it if you can suggest on how can i do this using angularjs.</p>