I have a function mycredits();
to get number of credits available . I have to show it as my notification , when I do certain operation like adding user or offering user, my credits will get reduced. but now I navigate to one page to another only this is working , in same page the credits values are not getting refreshed.
$scope.mycredits = function(){
$scope.totalCredits = response.json.response.data.totalcredits;
}
$scope.addUser = function(){
if(statuscode == 0){
$scope.mycredits();
}
}
my html :
<a href="#/credits">
<i class="fa fa-money"></i>
<span>CREDITS</span>
<span class="creditBlock" >{{totalCredits}}</span>
</a>