I am new to ionic1 framework and working on sidemenu ionic app. Currently i am working on login functionality using web-service, its working fine. I am saving login information using sessionStorage.
sessionStorage.setItem('loggedin_id', data.uid);
after that redirect to profile page using $state.go('app.profile', {}, { reload: true });. In profile controller fetching information on the basis of loggedin_id using $http.post method.
At first time i am getting logged in user's detail on profile page, when i logout using sessionStorage.clear(); it redirect back to login page and than i am logged in again with another user and redirected to profile page it will not display current logged in user's detail it display old user's detail.
I have tried to alert loggedin_id within login function it alert's correct id of users but not user's information. Please help me how to resolve this.