Fundamental question on tabs

How do i solve the following problem : (using the basic tutorial example with friends).

if I have 1 tab that reads the list such as :
.controller(‘ChatsCtrl’, function($scope, Friends, $http) {
$scope.friendsCounter = Friends.all().length;

then in another tab user adds a friend. However switching back to this tab, still the old count is displayed because the scope.friendsCounter was only populated initially and I am not sure how to reset it.

Any ideas?

Is Friends configured as service?

i am not sure how do i check that.

Check out ion view caching introduced in beta 14, your view is cached. You need to update it.

yes. that’s exactly what’s going on. so how do i update my view?
is that through $scope.$apply?
from this article :

you need to catch ionview.enter event and reload your data from the server

1 Like

i am going to disable caching for now. Performance is not an issue for me at this point.
from here :