我使用的選擇,在我需要選擇價值和動態創建的索引(我不想設置默認爲[0]指數) 如何它可以得到選擇價值指數做完了。如何動態地使用angularjs NG選項
<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>
這是一個模式,我想在另一個模式
第二模式,顯示選擇移動的這些變化編組
<span>{{contact.phoneNumbers[0].value}}</span>
在此
所以在的地方[0]索引我想把動態選擇的值。
第二模態由NG-重複的,從而給定的值被設置爲所有聯繫人。 –
你在哪裏使用ng-repeat。 {{contact}}
<按鈕按鈕圖標ion-ios-close「ng-click =」selectUserModal(contact);「納克級= 「selectedClassModal(接觸)」 NG式= 「checkSelectedModal(接觸)」> <按鈕類= 「按鈕按鈕圖標離子編輯」 NG單擊= 「showEditContactModal(接觸,$指數);」 > –