title: AngularJS set variable during iteration in template
body: <p>I need to display a list of messages with a "header" which contain only de date of the messages below, something like this:</p>
  
  <pre><code>2014-12-24
  Message 1
  Message 2
  Message 3
  2014-12-21
  Test 1
  Test 2
  </code></pre>
  
  <p>etc.</p>
  
  <p>I have the follow json:</p>
  
  <pre><code>[
      {
          created_at: "2014-12-24",
          message: "Message 1"
      },
      {
          created_at: "2014-12-24",
          message: "Message 2"
      },
      {
          created_at: "2014-12-24",
          message: "Message 3"
      },
      {
          created_at: "2014-12-21",
          message: "Test 1"
      },
      {
          created_at: "2014-12-21",
          message: "Test 2"
      },
  ]
  </code></pre>
  
  <p>How can I do that during iteration in a template using AngularJS?</p>
  
  <p>Thanks!!</p>