I need to update a div after selecting the option in ng-option.
Controller.js
$scope.prop = {
"type": "select",
"name": "Service",
"value": "CDI",
"values": [ "CDI", "IBOVESPA"]
};
index.html
<label for="indice">Indices:</label>
<select class="form-control input-sm"
data-ng-model="prop.value"
data-ng-options="v for v in prop.values">
</select>
<tbody>
<tr>
<td class="text-center">CDI</td>
<td class="text-center">{{vm.lamina.cdi.mes ?
(vm.lamina.cdi.mes | number : 2) :
vm.messageService.getN('MN009')}}</td>
<td class="text-center">{{vm.lamina.cdi.ano ?
(vm.lamina.cdi.ano | number : 2) :
vm.messageService.getN('MN010')}}</td>
<td class="text-center">{{vm.lamina.cdi.ultimoAno ?
(vm.lamina.cdi.ultimoAno | number : 2) :
vm.messageService.getN('MN010')}}</td>
</tr>
<tr>
<td class="text-center">% CDI</td>
<td class="text-center" data-ng-if="vm.cdiMes != '(-)'">{{vm.cdiMes | number : 2}}</td>
<td class="text-center" data-ng-if="vm.cdiMes == '(-)'">{{vm.cdiMes}}</td>
<td class="text-center" data-ng-if="vm.cdiAno != '(-)'">{{vm.cdiAno | number : 2}}</td>
<td class="text-center" data-ng-if="vm.cdiAno == '(-)'">{{vm.cdiAno}}</td>
<td class="text-center" data-ng-if="vm.cdiUltimoAno != '(-)'">{{vm.cdiUltimoAno | number : 2}}</td>
<td class="text-center" data-ng-if="vm.cdiUltimoAno == '(-)'">{{vm.cdiUltimoAno}}</td>
</tr>
</tbody>
You would need the support to change the tbody CDI to an IBOV tbody according to the option selected in the ng = option or to update the data in a single tbody.