KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In my Meteor app I find myself writing a lot of things like: Templates.myTemplate1.isCurrentUser = function() { return Session.get("isCurrentUser"); }; Templates.myTemplate2.isCurrentUser = function() { return Session.get("isCurrentUser"); }; I need many different templates (I'm using handlebars) to access the same simple value stored inside Session. Is there a way to avoid writing the same function over and over again? Thanks
Tags (comma-separated)
Save Edits
Cancel