0
I’m sorry, but I’m a layman and I’m starting! In HTML, I want to display the data defined in an angular controller class. As below:
$scope.tiposCategorias = [
{ id: 1, descricao:'Processados'},
{ id: 2, descricao:'Naturais'},
{ id: 3, descricao:'Perecíveis'},
{ id: 4, descricao:'Antiperecíveis'}
];
In the view I do a basic crud, but selecting only the data that is already defined in the controller class. As below:
<select class="form-control" ng-model="categoria.tipoCategoria" ng-options="tp.id as tp.descricao for tp in tiposCategorias" required></select>
After that, I want to present them in an HTML table. According to the code below:
<tr ng-repeat="cate in listaCategorias | filter:criteria">
<td>
{{cate.tipoCategoria==1?'Processados':'Naturais':'Perecíveis':'Antiperecíveis'}}
</td>
</tr>
However, when I choose the option and save, no information appears. The table is null. I know the error is when I call the angular parameter to show the information inside the table, but I don’t know how to fix it.
Thanks in advance if anyone can understand where the mistake is.
@Lucas Duete, could you make the rest of the code available? would be simpler to understand where the problem is. For example, what is performed with category object information?
– Mailson Teles Borges
Please provide more snippets of your code to make it easy to find the problem
– Lucas Duete
Thanks for the help!
– Will_1020