I've created a list where I need to show whether an item has already been read or not, so I check a variable with the ng-if directive. However when the item is opened, and then returns / navigates back to the list, there is no change in the list. I noticed that the variable being checked with ng-if is having its value changed, but ng-if does not re-evaluate when the view is shown again. ng-if only works when the screen is loaded / reloaded, ie when I close and open the app again.
How could you get around this problem?
<ion-item collection-repeat="item in items"
ng-click="ctrl.marcaLida(item.id)"
ui-sref="menu.telaLeitura({idItem:item.id})">
<p ng-if="!item.lido_em">o</p>
{{item.nome}}
</ion-item>
</ion-list>
I'm using router for navigation.