kaneruan opened this issue 9 years ago · 1 comments
var currentPostId = this._id;
根据router.js
Router.route('/posts/:_id',{ name:'postPage', data:function () { return Posts.findOne(this.params._id); } });
通过路由得到data,根据context(上下文)可知(在meteor中this等价于context data)