NG-Repeat expression value outside the NG-Repeat
<p>i am trying (still learning) to get the value of an NG-Repeat expression outside the NG-Repeat and use it as a value inside a class. This is the NG-Repeat section (i simplified it):</p>

<p>The Classiccds is the array i get from the JSON and the colorcode is a colomn inside, each cd has a different color code.</p>

<pre><code>&lt;div ng-repeat="cd in cds = (classiccds | limitTo:1)"&gt;
  &lt;div&gt;{{cd.colorcode;}}&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>RESULT: #ffffff</p>

<p>The above works fine, it returns me the colorcode of the first cd in the array
but i also would like to use it somewhere else, outside of the array, on the page background (since it returns only one row) as such.</p>

<pre><code>&lt;div style="background-color:{{cd.colorcode}}&gt;
  &lt;div ng-repeat="cd in cds = (classiccds | limitTo:1)"&gt;
    &lt;div&gt;{{cd.colorcode;}}&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>