I am studying a meteorite and follow this link.
When I use Session.set , it gives me a Session is not defined error in the console
My main.js file code in the client folder is listed below
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'm doing wrong
I have already read this article.
My file is inside the client folder and the code is also inside the isClient condition. However, this gives me an error.
source share