Skip to content

Instantly share code, notes, and snippets.

@nooitaf
Last active August 29, 2015 14:01
Show Gist options
  • Save nooitaf/21a0c20b7d581ee28227 to your computer and use it in GitHub Desktop.
Save nooitaf/21a0c20b7d581ee28227 to your computer and use it in GitHub Desktop.
findtest
<head>
<title>findtest</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
{{#each posts}}
<li>
{{title}}
</li>
{{/each}}
</template>
Posts = new Meteor.Collection('posts');
if (Meteor.isClient) {
Template.hello.posts = function(){
return Posts.find({});
}
}
@nooitaf
Copy link
Author

nooitaf commented May 11, 2014

Then do in Browser Console

Posts.insert({title:'something'});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment