How to declare and access global variables in Meteor.<template>.events?

I have a requirement to use global variables which will be useful for multiple events. Meteor…events is just to declare the events currently i used Meteor…onRendered for the same but for events used jquery. Need to move this event triggers of Jquery to Meteor Template style. But need to use the global variables.

You can try the Session variable package: https://atmospherejs.com/meteor/session

If that doesn’t suit your needs this StackOverflow question may help: http://stackoverflow.com/questions/27509125/global-variables-in-meteor

1 Like

Thankyou @therealnate ,

your link given a solution to me(global variables in meteor).