0
<select #businesstype class="form-control" id="business_type" required [(ngModel)]="update.business_type" name="business_type" #Type="ngModel">
                                        <option disabled>Select</option>
                                    <option *ngFor="let user of users" [value]="user.id">{{user.method}}</option>>
                                </select>

I have a doubt once i select the drop down is stored in id(user.id).but how to store method and id in single value.

Hariprasath
  • 55
  • 1
  • 1
  • 9

1 Answers1

4

Just assign an object in value:

[ngValue]="user"

or

[ngValue]="{id: user.id, method: user.method}"

edit

Use ngValue.

Carsten
  • 4,005
  • 21
  • 28