Ion-select-离子 4/5 中的选项?
Ion-select-option in ionic 4/5?
我希望将以下 JSON 绑定到 ion-select 中。谁能帮我完成这个。 JSON 看起来不错吗?
{
"1": "Lynko Pvt. Ltd. ",
"4": "Letsclick Pvt. Ltd. ",
"5": "Wirehead ",
"6": "Codeyiizen Software & Services Pvt. Ltd. ",
"7": "Mariao Barando ",
"8": "Jorge Santacruz ",
"9": "Matt Core ",
"10": "Manny Singh ",
"11": "Manoj Mishra ",
"12": "Digi Interacts ",
"13": "IHF Ltd. ",
"14": "Hadiur Rahman ",
"15": "The Football Link ",
"16": "BSPL ",
"17": "Votestalk ",
"18": "Codeyiizen "
}
您可以绑定 ion-select 选项,因为 follows.Your JSON 看起来不正确。我给个参考码
<ion-item>
<ion-label data-target="#filter3">Travel Agencies</ion-label>
<ion-select id="filter3" multiple="true">
<ion-option id="filter3" *ngFor="let travels of filter_type.travels " value="{{travels.id}}">
{{travels.name}}</ion-option>
</ion-select>
</ion-item>
我希望将以下 JSON 绑定到 ion-select 中。谁能帮我完成这个。 JSON 看起来不错吗?
{
"1": "Lynko Pvt. Ltd. ",
"4": "Letsclick Pvt. Ltd. ",
"5": "Wirehead ",
"6": "Codeyiizen Software & Services Pvt. Ltd. ",
"7": "Mariao Barando ",
"8": "Jorge Santacruz ",
"9": "Matt Core ",
"10": "Manny Singh ",
"11": "Manoj Mishra ",
"12": "Digi Interacts ",
"13": "IHF Ltd. ",
"14": "Hadiur Rahman ",
"15": "The Football Link ",
"16": "BSPL ",
"17": "Votestalk ",
"18": "Codeyiizen "
}
您可以绑定 ion-select 选项,因为 follows.Your JSON 看起来不正确。我给个参考码
<ion-item>
<ion-label data-target="#filter3">Travel Agencies</ion-label>
<ion-select id="filter3" multiple="true">
<ion-option id="filter3" *ngFor="let travels of filter_type.travels " value="{{travels.id}}">
{{travels.name}}</ion-option>
</ion-select>
</ion-item>