I have a problem using <select> with ng-repeat in Angular.
I'm using the following code:
HTML:
<select ng-model="device.remote" ng-repeat="remoteID in device.remoteIDs">
<option value="{{ remoteID.id }}">{{ remoteID.name }}</option>
</select>
Angular:
$scope.device = response.data;
response.data looks like this:
{
"remote": "",
"remoteIDs": [
{
"id": "1",
"name": "TEST"
}
]
}
In the WebApp I get this result:
<option value="? string: ?"></option>
<option value="1" class="ng-binding">TEST</option>
but I dont want to show the ? string: ?-option. How can I remove it?
I only want to display the options in remoteIDs
$scope.deviceis exactly the same asresponse.datang-optionsinstead ofng-repeat