 <p>You need to have a separate cards array for each movie. One way to do this is to make <code>cards</code> a property of <code>movie</code>.</p> <p>In the HTML, we modify it to pass <code>movie</code> to <code>addCard()</code>. In this context, <code>movie</code> is the current movie that the <code>ng-repeat</code> is iterating over. Without this, the <code>addCard()</code> function would not be aware of what movie it should be adding cards to. We also change the second <code>ng-repeat</code> to use <code>movie.cards</code> so that it knows to only look at the cards pertaining to that movie.</p> <pre><code>&lt;div ng-repeat = "movie in movies" class="repeat"&gt; &lt;a ng-click="addCard(movie)" ui-sref=".container-big" &gt;More info&lt;/a&gt; &lt;div ng-repeat="card in movie.cards" my-card="card"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>In the JavaScript, we modify the <code>addCard()</code> function so that it takes <code>movie</code> as an argument. We also need to change it so that it creates a place to store the cards for that movie</p> <pre><code>$scope.addCard = function(movie) { // create movie.cards array if it does not exist if (!movie.cards) { movie.cards = []; } // add the card to the list of cards for this movie movie.cards.push(new Card()); }; </code></pre>