i'm trying wait value may change after execute "this.bookmarlist.take(1).subscribe(..." my problem when run application, execute second if statement "if(found==false)" before execute subscribe. this code may found thing wrong or need add additions solve problem. let loader = this.loadingctrl.create({ content: "", }); let found=false; loader.present().then(()=>{ this.bookmarklist.take(1).subscribe(data=>{ data.foreach(b=>{ if(b.nid==this.appservice.id && b.url==url){ let alert = this.alertctrl.create({ title: 'already bookmarked', subtitle: 'this note image bookmarked', buttons: ['ok'] }); alert.present(); found=true; } }) }) }).then(()=>{ if(found==false){ this.afd.list('/bookmark/').push({ uemail: th...
Comments
Post a Comment