title: AngularJS issue with dropdown menu and accessing elements outside ng-repeat
body: <p>this is my problem:</p>
  
  <p>I have a DIV, where you have 4 fields: 2 dropdowns and 2 input[text].</p>
  
  <p>3 of the fields get populated by a ng-repeat over an array of objects:</p>
  
  <pre><code>$scope.ddList = [
          {
            code: 1253,
            name: "test13",
            supervisor: "cas3",
            overseer: "cas32",
            kstTextColor: "#000",
            kstBackgroundColor: "#fff"
  
          }, and so on..
  </code></pre>
  
  <p>and the last 4th field has it's own array that gets repeated to populate it:</p>
  
  <pre><code> $scope.ddColor = [
          { backgroundcolor: "rgb(255, 170, 14)",
          textcolor: "#fff"
          },
          {backgroundcolor: "rgb(245, 73, 73)",
          textcolor: "#fff"
  
          }, and so on...
  </code></pre>
  
  <p>The main dropdown, which loops over <code>ddList</code> and shows the element: <code>ddList.name</code>
  is the problem.</p>
  
  <p>I want that when you select an element from that dropdown, the 2 input[text] fields, get populated by the other 2 properties in that object, <code>ddList.supervisor</code> <code>and ddList.overseer</code> .</p>
  
  <p>The issue is that the dropdown has the ng-repeat inside its template file, so the 2 input[text] fields are out of it, and I can't just call <code>ng-model="k.supervisor"</code> and <code>ng-model="k.overseer"</code> because they are out of scope.</p>
  
  <p>How can I solve this? So based on the selection in the first dropdown, populate the input[text].fields with the corresponding object?</p>
  
  <p>The second problem I have, is about the second dropdown menu with its own ng-repeat and array.<br>
  I want that when an element is chosen in the first dropdown, the user can select one "color" from the second dropdown, and that color properties: <code>ddColor.backgroundcolor</code> and <code>ddColor.textcolor</code> will get copied onto the main array, over the properties: <code>ddList.kstTextColor</code> and <code>ddList.kstBackgroundColor</code>.</p>
  
  <p>I think I could resolve the second issue when I have a solution for the first one, because it has the same problem, I can't access to the scope of that ng-repeat, so I can't call with a function the right elements in the loop and overwrite them with the new colors.</p>
  
  <p>Here a jsFiddle:</p>
  
  <p><a href="http://jsfiddle.net/xytyg8vc/8/" rel="nofollow noreferrer">http://jsfiddle.net/xytyg8vc/8/</a></p>
  
  <p>Thank you very much</p>