Here is the HTML code:
<select data-ng-options="o.id as o.device for o in deviceList" data-ng-model="selectedDeviceID"></select>
<input type="text" id="deviceWidth" ng-model="deviceList[selectedDeviceID].width" placeholder="width"/>
Provided Data:
$scope.deviceList = [{id: 0, device: 'Apple iPhone 5', width:320,height:568},
{id: 1, device: 'Nokia Lumia 920', width:320,height:533},
{id: 2, device: 'Samsung Galaxy S III', width:360,height:640}]
Currently, selecting a device from the dropdown displays its width in the textbox. However, I want the displayed value in the textbox to be editable without affecting the original values.
In summary, I aim to have the displayed value in the textbox be editable without changing the stored values.