在我的项目中,我需要在 User -> Sign out 上调用回调函数,以便将 Session 值设置为“null”。
有没有办法覆盖 Meteor.logout()
行为?
如何提供那个回调函数?
谢谢
最佳答案
Meteor.logout() 有一个回调函数。
http://docs.meteor.com/#meteor_logout
Meteor.logout(function(err) {
// callback
Session.set("ses",false);
});
--
Template.tplName.events
"click #logout": (e, tmpl) ->
Meteor.logout ->
Session.set "ses", false
关于javascript - Meteor 中的用户注销回调,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14935747/