title: Ng-Repeat ng-show if previous item field value different
body: <p>If have a list of items with date field which is ordered by date. I want to group these items by date somethings like;</p>
  
  <h2>Date1</h2>
  
  <ul>
  <li>item1</li>
  </ul>
  
  <h2>Date2</h2>
  
  <ul>
  <li>item2</li>
  <li>item3</li>
  </ul>
  
  <p>and so forth...</p>
  
  <p>What I have is this;</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li ng-repeat="listing in listings | filter:query"&gt;
          &lt;h1 ng-show="$index === 0 || listings[$index - 1].created !== listing.created"&gt;
              {{listing.created | date:mediumDate}}
          &lt;/h1&gt;
          {{listing.title}}
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>But this way h1 element becomes the child of li element which messes up presentation. Is there some other way to write this ng-repeat the way I want?</p>