<ion-select (ionChange)="onCountryChange($event)" [value]="country" formControlName ="country" name="country">
<ion-select-option [value]="country.name" *ngFor="let country of countryList">
{{country.name}}
</ion-select-option>
</ion-select>我需要从页面加载时从本地存储获取的值中设置默认值
发布于 2020-01-09 21:21:26
超文本标记语言的
<ion-select (ionChange)="onCountryChange($event)" [value]="selectedType" formControlName ="country" name="country">
<ion-select-option [value]="country.name" *ngFor="let country of countryList">
{{country.name}}
</ion-select-option>
</ion-select>用于TypeScript的
this.selectedType = countryList.find(c => c.value == 'condition');https://stackoverflow.com/questions/59663787
复制相似问题