Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

How to apply placeholder in select dropdown along with [ngmodel] in angular 6?

$
0
0

whenever I use [(ngModel)] first value becomes empty. but when I remove [(ngModel)] it is working fine.

<select class="custom-select" id="campaignDropdown" [(ngModel)]="campaignInfo" placeholder="Select Campaign" (change)="hitApiFunction(campaignInfo)">
            <option value="" disabled selected>Select Campaign</option>
              <option *ngFor="let campData of campaigns" [ngValue]="campData"> 
                  {{campData.campaign_name}}
              </option>
            </select>

Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>