title: How to pre-select phone code based on country select in angular JS?
body: <p>I like to have a Country select dropdown and based on Country select, the below input box for phone number should automatically pre-select the mobile number code.</p>
  
  <p>So, that I'll save the phone number country code and Country. </p>
  
  <p>I've seen this plunker <code>plnkr.co/edit/DYyfGj?p=preview</code> , but it's not like what I'm trying to achieve.</p>
  
  <p>This is what I've tried so far :</p>
  
  <p><strong>HTML :</strong> </p>
  
  <pre><code>&lt;select ng-model="country" 
      ng-options="country.name for country in countriesWithPhoneCode" 
      &gt;
      &lt;option value=""&gt;Select country&lt;/option&gt;
    &lt;/select&gt;
  
    {{country}}
  </code></pre>
  
  <p>Currently the above code lists the countries. Based on the selection i need to pre-populate the dial code for next input.</p>
  
  <p>here's my plunker <a href="https://plnkr.co/edit/zmTmpgCJ70N0MOO2UW4U?p=preview" rel="nofollow">https://plnkr.co/edit/zmTmpgCJ70N0MOO2UW4U?p=preview</a></p>