Storage is null when i call storage.get(key)

#1

Hello,

Im trying to set the user info when i login into the app and when i go to the profile page im trying to retrieve the data.

To set and get the user info Im using a separate service

public setStorageUser(user:any){

         return this.storage.set('user', user);

    }
    public getStorageUser():Promise<any>{

            return this.storage.get('user');

    }

Setting value on Login Page

this.loginService.setStorageUser(userData).then(()=>{

          this.navController.setRoot(HomePage);

        });

Retrieving the user data on Profile page

           this.loginService.getStorageUser().then((user)=>{
         console.log(JSON.stringify(user));
        });

I always get null user, help!!