I have an input of type="radio"
that when clicked calls a function and fills a select .. but this only happens when I click on the input .. I need it to automatically load the page, I have the following code:
<label class="margin-10-right">
<input data-ng-click="vm.getFinanceiroTipoReceita(); vm.despesa.TipoSaida = false; vm.despesa.TipoEntrada = true"
data-ng-checked="!vm.despesa.TipoEntrada"
data-ng-value="true"
data-ng-model="vm.despesa.TipoEntrada"
name="tipo"
type="radio">
Entrada (Receita)
</label>
function getFinanceiroTipoReceita() {
vm.listaArray = [];
$.each(vm.listaTipoDespesa, function (indice, obj) {
if (obj.TipoEntrada == true) {
vm.listaArray.push(obj);
// console.log(vm.listaArray);
}
});
}