如何在页面重定向后显示Flash通知

时间:2014-10-27 01:56:07

标签: meteor

给出以下代码:

Posts.update(currentPostId, {$set: postProperties}, function(error) {
    if (error) {
        // display the error to the user
        alert(error.reason);
    } else {
        Router.go('postPage', {_id: currentPostId});
    }
});

如何使用以下代码并添加显示一条Flash消息,告知用户该项目已被更新,而不是被定向到新消息?

1 个答案:

答案 0 :(得分:3)

你看过各种flash message packages吗?

naxio:flash特别支持iron:router