Error: in ng-options [orderby:notarray]

Asked

Viewed 41 times

0

There’s an error in the console that I can’t figure out

Error: [orderby:notarray] Expected array but Received

The list is coming right on the combobox, but gives the error I mentioned.

Follow HTML and Angular as I am doing:

function carregaCadastro() {    
    var cad = gatewayClient.delivery('cadastro').request('lista');
    requestMonitor.add('formCadstro', cad);
    gatewayClient.execute(cad).then(function(result) {
        $scope.cadastro = result.data.value;
    })
}
<div class="col">
  <select class="form-control"  name="cadastro " ng-options="cadastro.nome for cadastro  in (cadastro  | orderBy:'noem') track by cadastro.id" ng-model="cadastro"  id="cadastro">
    <option value="" disabled selected> -- Selecione -- </option>
 </select>
</div>
  • It has how to give a console.log on cadastro and show output in question?

  • is just a typo in orderBy:'noem' or the right thing would be orderBy:'nome'?

  • the correct name is same was typing error

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.