javascript - Can anybody tell me how to add or update data from the different pages to app module in ionic 2 -


i using below code setting variables values in app module via native storage. values come login page.

this.menu.open().then(() => this.native.getitem('data') .then(data => {     if(data != null){         alert('native acess');         this.user_name = data.name_user;         this.user_image = data.profile;     } });   this.native.getitem('fbdata') .then(fb => {     console.log(json.stringify(fb));     if(fb != null && this.user_name == null &&          this.user_image == null){             alert('hello');             this.user_name = fb.fb_name;             this.user_image = fb.fb_image;         }     });  }).catch( (err) => {      console.log(err); }); 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -