title: problem creating odd and even cell in a table in Vue Js
body: <p>Here is my code, myData is my vue data model which has some field: a,b, ...
  odd-cell and even-cell are the CSS classes with different background color. its a foreach loop, how can i calcultate something like if (length of myData % 2 == 1)  in v-if  to add the odd and even class in my div. </p>
  
  <pre><code>            &lt;div v-for="item in myData"&gt;
                  &lt;div v-if="" class='odd-cell'&gt;
                      &lt;p&gt; {{item.a}} &lt;/p&gt;
                      &lt;p&gt; {{item.b}} &lt;/p&gt;
                  &lt;/div&gt;
                  &lt;div v-else class='even-cell'&gt;
                     &lt;p&gt; {{item.a}} &lt;/p&gt;
                     &lt;p&gt; {{item.b}} &lt;/p&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>[i am writing in cshtml view page, so you can suggest c# code as well..]</p>