Sorry, but I'm a layman and I'm starting! In HTML, I want to display the data defined in a controller's angular 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 make 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 saved, no information appears. The table is null. I know the error is when I call the angle parameter to show the information inside the table, but I do not know how to fix this.
Thank you in advance if anyone can understand where the error is.