Default select value


#1

Hi
Have the below code

<ion-list>
	<ion-item>
		<ion-label>Size</ion-label>
		<ion-select [(ngModel)]="rebarsize1">
		<ion-option *ngFor="let area of rebar_area_array; let i=index" value="{{area}}mm">{{rebar_size_array[i]}}mm</ion-option>
		</ion-select>
	</ion-item>
</ion-list>

Now I want that when indix is 2, the item will be selected. How can I do that


#2

Assign whatever that value is to the backing rebarsize1 property.


#3

thnx, it works very well. I assigned it in the constructor. now everything seems good


#4

Please sign rapropos answer as solution :slight_smile: