Skip to content

Instantly share code, notes, and snippets.

@schickm
Created April 3, 2015 14:49
Show Gist options
  • Save schickm/660e780c4cbcb3126303 to your computer and use it in GitHub Desktop.
Save schickm/660e780c4cbcb3126303 to your computer and use it in GitHub Desktop.
3 ways of doing the exact same thing
var postsData = [
{
title: 'Introducing Telescope',
url: 'http://sachagreif.com/introducing-telescope/'
},
{
title: 'Meteor',
url: 'http://meteor.com'
},
{
title: 'The Meteor Book',
url: 'http://themeteorbook.com'
}
];
Template.postsList.helpers({
posts: postsData,
anotherPosts: function() {
return postsData;
},
yetAnotherPosts: function() {
return [
{
title: 'Introducing Telescope',
url: 'http://sachagreif.com/introducing-telescope/'
},
{
title: 'Meteor',
url: 'http://meteor.com'
},
{
title: 'The Meteor Book',
url: 'http://themeteorbook.com'
}
];
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment