0
How can I do the same Angular ng-repeat function in Flask?
<tbody ng-repeat="x in oCtrl.ListaProdutosAno | filter:{codigoProduto: produto_estatistica.codigoProduto} track by x.codigoProduto + x.ano">
<tr>
<td class="text-center" style="vertical-align: middle; width: 4%">
{{x.ano}}
</td>
</tr>
</tbody>
I know the part ng-repeat="x in oCtrl.ListaProdutosAno
can be done with a for x in oCtrl.ListaProdutosAno
, but I didn’t quite understand what the part | filter:{codigoProduto: produto_estatistica.codigoProduto} track by x.codigoProduto + x.ano
does and how it could be in Flask.
Perhaps it would not be the case to already bring the
list
formatted? Why in the case ofng-repeat
I imagine it’s done on the client’s side, and theflask
uses the server-side processed template engine. It would not be the case to refactor the return logic of the products?– Wallace Maxters
@Wallacemaxters, I hadn’t thought of that, vlw by the tip.
– Marco Souza