I pass url parameters stored in a localstorage to get details of a particular item. i want to delete localstorage variable after view is loaded, but what i'm experincing is, the localstorage variables get deleted before the view is loaded preventing the data to load correctly
$scope.pushpayment_id = localStorage.getItem("pushpayment_id")
$scope.pushshop_id = localStorage.getItem("pushshop_id")
$scope.pushmessage = localStorage.getItem("push_message")
var startapp=function() {
if($scope.pushmessage== "payment"){
$location.path('/tab/new_payment_push/'+ $scope.pushpayment_id + '/' + $scope.pushshop_id);
}
}
localStorage.removeItem("pushpayment_id")
localStorage.removeItem("pushshop_id")
localStorage.removeItem("push_message")