Reputation: 3622
Currently, I have an angular.js <select>
filled by the following query:
c.ip for c in cameras track by c.idCamera
and it produces on my <select>
something like:
<option value="1">192.168.0.121</option>
<option value="2">192.168.0.122</option>
<option value="3">192.168.0.123</option>
...
my $scope
has a list of cameras and I can see the IP, but I want to use two fields as label -- let's say camera's IP and type.
I'm looking way to produce as output something like this:
<option value="1">192.168.0.121 - ZOOM</option>
<option value="2">192.168.0.122 - PAN </option>
<option value="3">192.168.0.123 - ZOOM</option>
...
I'm currently using angular.js beta 6, if that has any additional bearing on the matter.
Upvotes: 3
Views: 1007
Reputation: 1734
You can do this :
(c.ip + ' ' + c.yourField) for c in cameras track by c.idCamera
Upvotes: 1