Advertisement
Guest User

Untitled

a guest
May 24th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. if (Meteor.isClient){
  2. //e.g.
  3. yourName = new ReactiveVar("John Smith")
  4. // make every ReactiveVar available by its name in meteor templates
  5. _.chain(this).pairs().filter(function(pair){
  6. return (pair[1] instanceof ReactiveVar);
  7. }).each(function(pair){
  8. Template.registerHelper(pair[0], function(){
  9. return pair[1].get();
  10. });
  11. });
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement