Bug or implementation error with ng-if on Ionic?

0

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.

    
asked by anonymous 20.08.2015 / 19:32

1 answer

0

Checks whether ng-click="ctrl.marcaLida(item.id)" is changing the status of the item from where they come from, bank, localstorage, etc. Why when you exit the screen and back it is executing the repeat of the items and it is not marked as read

    
20.08.2015 / 20:28