In my ionic2 application, I have successfully integrated Google Maps functionality. However, I am currently struggling with saving the formatted address to local storage.
Whenever I reload the page, I consistently encounter the following error:
Uncaught TypeError: Cannot read property 'set' of undefined
Below is a snippet of my JavaScript code:
ionViewDidLoad(){
let loader = this.LoadingController.create({
content: 'Getting your Location'
});
loader.present().then(()=>{
//Rest of the JavaScript code goes here...
I am perplexed by the line
this.storage.set('user_lng', this.lng);
which saves the user's latitude and longitude to the local storage without any issues.