I have have this select field:
code:
<select ng-model="productForm.productDesc.idproductDesc" ng-options="opt2.idproductDesc as opt2.description for opt2 in productDesc"/>
where productDesc
is a result JSON text from a query, where productDesc
is the table and idproductDesc
and description are two attribute of this table. I want to show another attribute of productDesc
, such as prize (opt2.price
in this case). I want something like that:
however: opt2.name - opt2.price
, for example if opt2.name
is "Patatine fritte classiche" and opt2.price
is 1:
"Patatine fritte classiche - 1" (like in the second picture).
Otherwise an output field with the opt2.price
of the selected element, in this way:
how can I do it?