title: With Angular - How to Pre-Select a Option that gets repeated out if a value exist?
body: <p>So what I am trying to do is pass a parameter in the url to a page with a select being repeated out.  The parameter passing is customerProfile.id.  Then I am trying to find that customerProfile.id in the select options and select it.  How do I go about that?  So if customerProfile.id exist select corresponding option if not default.  The ids being spit out are all like 1,2,3,4,5, etc... If you need more info let me know.</p>
  
  <p>Here is the select:</p>
  
  <pre><code>&lt;div class="form-group" id="testpick"&gt;
     &lt;label for="field_customerProfile"&gt;customerProfile&lt;/label&gt;
     &lt;select class="form-control" id="field_customerProfile" name="customerProfile"
       ng-model="rentalAgreement.customerProfile"
       ng-options="customerProfile as customerProfile.lastName for customerProfile in customerprofiles track by customerProfile.id"&gt;
        &lt;option value=""&gt;&lt;/option&gt;
     &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Tried this with the 1 being replaced later with the parameter.</p>
  
  <pre><code>angular.element('div#testpick select').val('1');
  </code></pre>