選択した値と動的に作成されるインデックスが必要なselectを使用しています(デフォルトは[0]インデックスに設定したくありません) 終わり。anglejsでng-optionsを使用して選択した値インデックスを動的に取得する方法
<div class="input-label">
Select Mobile
</div>
<select ng-model="mobile" ng-options="mobile as mobile.value for mobile in editContactModalData.phoneNumbers"></select>
</label>
Above is select option and below is input box where the selected value is set
<label class="item item-input item-stacked-label" ng-show="mobile">
<input type="tel" maxlength="10" placeholder="mobile" ng-model="mobile.value">
</label>
これは1つのモーダルで、私は2番目のモーダルの代わりに、この中にそう
<span>{{contact.phoneNumbers[0].value}}</span>
から成る別のモーダル
に選択された移動のこれらの変更を表示したいです[0] index私は動的に選択された値を入れたい。
第モーダルがNGリピートから成るビューに表示されます。 –
ng-repeatを使用している場所。 –
<アイテムアイテムクラス= "アイテムアイコン - 右側の編集選択" ng-repeat = "連絡先をmodalDataで" ng-click = "selectUserModal(連絡先)"> {{連絡先}}