I am using MeteorJS technology and trying alerts on success or failure of meteor call. And alerts not working, unable to recognize the problem. And this is a client-side code. Template.socialIntFBGoogle.events({ 'click .socialFb': function(event) { Meteor.loginWithFacebook({}, function(err){ if (err) { throw new Meteor.Error("Facebook login failed"); }else{ alert("Google login"); Meteor.call('transfer',function(error, result){ if(error){alert(error);} else{alert("Successful");} }); FlowRouter.go('/'); } }); }, }); Thanks in Advance!
答案 0 :(得分:0)
出于记录目的,您不应使用警报而是用以下内容替换警报调用:
console.log("your message");
之后,您可以查看Web浏览器开发工具中的输出。