Inspecting the HTML you can see it has 'selected' set to true, but no 
option text is displayed; it just empty.  Once you click on the drop down 
you can see all the options, but I want the first option to be visible by 
default.


        <select *ngIf="q.type == 'select'" name="q.id" [(ngModel)]=
"ng2Form[q.id]">                 <option *ngFor="let a of q.answers; let 
iii = index;" 
                   [selected]="(iii == 0)?'selected':null"
                   [value]="a.id">{{a.text}}</option>
        </select>




Plunkr <https://plnkr.co/edit/GU3BXain0E581pTXijrN?p=preview>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to