Hi guys just want to know your insights about this issue cause I’m stuck finding the right solution.
I got all the right data from the server whenever i login. But when i started login again, It seems all the previous data wasn’t removed.
Hi guys just want to know your insights about this issue cause I’m stuck finding the right solution.
I got all the right data from the server whenever i login. But when i started login again, It seems all the previous data wasn’t removed.
Are you referring to data that was stored in memory or local storage?
I’m guessing that your referring to the data in the login form.
Just set the values to null, or empty string on login success.
I would also highly recommend using Angular-formly to handle your forms… makes life a lot easier in the long run.
If you’re referring to your scope data not beeing load with the new data,
i’ve ben using (on logout) :
$timeout(function(){ $rootScope = $rootscope.$new(true); $scope = scope.$new(true); $ionicHistory.clearCache(); $ionicHistory.clearHistory(); },500);
this is what I do
There is cache in ionic, and if you don’t clear scope, even if you have cleared data on services, you will see the same data.
thank to you sir! godbless
thanks to you sir!
thanks for the idea sir. i managed to solved the problem!