I am currently working with a select element, where I need both the selected value and dynamically generated index (I do not want to set the default index to [0]). How can this be achieved?
<div class="input-label">
Select Mobile
</div>
<select ng-model="mobile" ng-options="mobile as mobile.value for mobile in editContactModalData.phoneNumbers"></select>
</label>
The code above represents a select option, while below there is an input box where the selected value is displayed.
<label class="item item-input item-stacked-label" ng-show="mobile">
<input type="tel" maxlength="10" placeholder="mobile" ng-model="mobile.value">
</label>
This pertains to one modal, but I wish to display these changes of the selected mobile in another modal.
The second modal includes:
<span>{{contact.phoneNumbers[0].value}}</span>
Therefore, instead of specifying the [0] index, I would like to dynamically insert the selected value.