Last active
December 31, 2015 22:39
-
-
Save sergeyt/8054730 to your computer and use it in GitHub Desktop.
gist for meteor-typeahead demo
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
Repos = new Meteor.Collection("repos"); | |
if (Meteor.isServer){ | |
Meteor.startup(function(){ | |
Repos.remove({}); | |
// fill repos from private repos.json asset | |
JSON.parse(Assets.getText('repos.json')).forEach(function(it){ | |
Repos.insert(it); | |
}); | |
}); | |
} | |
if (Meteor.isClient){ | |
Template.demo.repos = function(){ | |
return Repos.find().fetch(); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment