title: AngularJS ng-repeat with different objects
body: <p>I'm new to AngularJS and have written an app which calls an specific API. It gets an object back like this:</p>
  
  <pre><code>posts = [
      posts = [...]
      users = [...]
  ]
  </code></pre>
  
  <p>That's the HTML template:</p>
  
  <pre><code>&lt;div id="{{'post-' + $index}}" ng-repeat="post in posts.posts"&gt;
      &lt;article&gt;
         &lt;h1&gt;{{post.user.username}}&lt;/h1&gt;
         &lt;span&gt;{{post.date | date: "dd.MM.yy, HH:mm"}}&lt;/span&gt;
         &lt;p&gt;{{post.content}}&lt;/p&gt;
      &lt;/article&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to show different posts (from the posts object) including the username (which is in the users object). How can I tell Angular that the posts are in the posts object and the proper usernames are in the users object?</p>