title: angularjs ng-class with different conditions
body: <p>i have a view which shows data and i want to add another class on the list items in my view.</p>
  
  <pre><code>&lt;input type="text" class="filter" placeholder="search..." ng-model="search"&gt;
  &lt;ul&gt;
      &lt;li ng-repeat="item in items | filter:search | orderBy:'date'"&gt;
          {{ date }} {{ item.heading }}&lt;button ng-click="deleteItem(item.ID)"&gt;&lt;i class='icon-trash'&gt;&lt;/i&gt;&lt;/button&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>i have a variables called <em>item.date</em> and i want to compare it to another variables <em>today</em>. Here is the logic:</p>
  
  <pre><code>if (item.date - today &lt;= 0) 
      apply class1 
  if else (item.date - today &gt; 0 &amp;&amp; item.date - today &lt;= 3)
      apply class2
  and so on
  </code></pre>
  
  <p>how can i achieve this with angular?
  can i put this logic directly into my view or do i need to define it in my controller?</p>
  
  <p>thanks in advance</p>