admin管理员组文章数量:1317906
I am learning meteor and following this link.
When I use Session.set
it gives me error Session is not defined
in console
My code of main.js file within client folder is following
PlayersList = new Meteor.Collection('players');
if(Meteor.isClient) {
Template.leaderboard.events({
'click .playerName ': function(){
var playerId = this._id;
Session.set('selectedPlayer', playerId);
}
});
}
I don't know what I am doing wrong
I already read this post.
My file is inside client folder and code also inside isClient
condition.
Still it giving me error.
I am learning meteor and following this link.
When I use Session.set
it gives me error Session is not defined
in console
My code of main.js file within client folder is following
PlayersList = new Meteor.Collection('players');
if(Meteor.isClient) {
Template.leaderboard.events({
'click .playerName ': function(){
var playerId = this._id;
Session.set('selectedPlayer', playerId);
}
});
}
I don't know what I am doing wrong
I already read this post.
My file is inside client folder and code also inside isClient
condition.
Still it giving me error.
1 Answer
Reset to default 10The session package isn't installed by default anymore. You just need to run:
meteor add session
本文标签: javascriptMeteor Session is not definedStack Overflow
版权声明:本文标题:javascript - Meteor: Session is not defined - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742030730a2416391.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论