Select Component : Binding Object


How can i bind an object to a select component?

I have a select component which displays value from FirebaseListObservable named subcategoryDetailsRef$
What ever user selects a value it is stored in “expenseDetails.subCategory”. . The below code works fine.

      <ion-select [(ngModel)]="expenseDetails.subCategory" >
        <ion-option *ngFor="let subcategory of subcategoryDetailsRef$ | async">{{subcategory.subcategoryName}}</ion-option>

But i have some more members in “subcategory” object which i want to bind with “expensedetails” object based on the selected “subcategoryName”.
How can i achieve this.


1 Like