title: How to compare values inside ng-repeat.?
body: <p>I need to compare values inside <code>ng-repeat</code>. How to compare previous value with current value inside <code>ng-repeat</code>. I have an array, having values [2,3]. I want to compare array second value with first. How to do it?<br>
  <strong>Update</strong>: I am displaying current month and date and next seven days. Now if in next seven days there is new month, i mean as january after december, I need to include this month just before the dates of this month.<br>
  <strong>Ex::</strong> Dec Tue 30, Wed 31, Jan Thu 1, Fri 2 ....</p>
  
  <p>All code is here: Fiddle: <a href="http://jsfiddle.net/HB7LU/9763/" rel="nofollow">http://jsfiddle.net/HB7LU/9763/</a></p>
  
  <pre><code> &lt;div class="row" style="text-align:center;background-color: #930d14; color: white; height: 55px;"&gt;
              &lt;div class="col" style="border-right: solid 1px #820d13;"&gt;
                  &lt;p style="transform: rotate(270deg);margin-top: 8px;font-size: 10px;font-weight: 600;text-transform: uppercase;"&gt;
                      {{currentMonth}}&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class="col" style="border-right: solid 1px #820d13;" ng-repeat="days in totalDays.aryDates"&gt;
                  &lt;p style="font-size: 10px;font-weight: 500;"&gt;{{days}}&lt;/p&gt;
                  &lt;p ng-if="totalDays.aryDates[$index-1] !== totalDays.aryDates[$index]" style="transform: rotate(270deg);margin-top: 8px;font-size: 10px;font-weight: 600;text-transform: uppercase;"&gt;
                      {{newMonth}}&lt;/p&gt;
              &lt;/div&gt;
  </code></pre>