title: Angular 2 : p-dropdown default value selection from options which are coming from API
body: <p>In Angular 2, P-dropdown is mapped with object which is populated from web API call. And after API call, ngModel is set to some value which is present in dropdown. But, still no value is shown as default and it still show placeholder value.</p>
  <p><strong>HTML</strong></p>
  <pre><code>&lt;div *ngIf=&quot;dropdownDataLoaded&quot; style=&quot;display: inline-block&quot;&gt;
                          &lt;span class=&quot;dropdown&quot; style=&quot;margin-left: 126px;&quot;&gt;
                              &lt;p-dropdown [options]=&quot;countryOptions&quot; placeholder=&quot;Select&quot; [(ngModel)]=&quot;selectedCountryValue&quot; inputStyleClass=&quot;dropdown&quot; optionLabel=&quot;name&quot; (onChange)=&quot;onCountryChange($event)&quot;&gt;&lt;/p-dropdown&gt;
                          &lt;/span&gt;
                      &lt;/div&gt;
  </code></pre>
  <p><strong>Component :</strong></p>
  <p>this.dropdownDataLoaded = false;</p>
  <pre><code>setTimeout(() =&gt; {
      this.databaseService.getCountryList().subscribe((countryList: IDropdownElement[]) =&gt; {
         this.countryOptions = countryList;
         this.dropdownDataLoaded = true;
         this.selectedCountryValue = {
          &quot;name&quot;: &quot;USA&quot;
         };
        }
  </code></pre>
  <p><strong>IDropdownElement Model :</strong></p>
  <pre><code>export interface IDropdownElement {
    name: string;
    id: string;
    type: string;
    code: string;
  }
  </code></pre>
  <p>Also, referred below link but no luck.</p>
  <p><a href="https://stackoverflow.com/questions/49623774/how-to-set-default-value-for-primeng-p-dropdown">How to set default value for PrimeNG p-dropdown</a></p>