Created
April 3, 2015 14:49
-
-
Save schickm/660e780c4cbcb3126303 to your computer and use it in GitHub Desktop.
3 ways of doing the exact same thing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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