Instantly share code, notes, and snippets.

Nachiket Patel nachiket-p

  • Logicwind
  • India
View GitHub Profile
@nachiket-p
nachiket-p / meteor-eventmap.html
Created Jun 28, 2012
How to create Backbone like event-map for meteor template events
View meteor-eventmap.html
<head>
<title>meteor-eventmap</title>
</head>
<body>
{{> hello}}
{{> hello2}}
</body>
<template name="hello">
@nachiket-p
nachiket-p / meteor_servercall.html
Created Jun 21, 2012
Meteor: Calling server method from client
View meteor_servercall.html
<head>
<title>meteor_servercall</title>
</head>
<body>
{{> simple}}
{{> passData}}
</body>
<template name="simple">
View app.js
if (Meteor.is_client) {
var userName = "PatelNachiket";
Template.hello.greeting = function () {
return "Fetch recent tweets from Twitter stream of user : " ;
};
Template.hello.events = {
'click #fetchButton' : function () {
console.log("Recent tweets from stream!");
$('#fetchButton').attr('disabled','true').val('loading...');