Created
March 6, 2017 23:56
-
-
Save robertdavid010/54d76834c142ddb1ad4e326d4b369ae9 to your computer and use it in GitHub Desktop.
Meteor Blaze Template Structure
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
if (Meteor.isClient) { | |
Template.home.onCreated(function () { | |
var self = this; | |
self.getSomething = function (param) { | |
// Get more complex stuff here | |
} | |
self.doSomething = function (param) { | |
// Do more complex stuff here | |
}; | |
}); | |
Template.home.helpers({ | |
myData: function (param) { | |
return Template.instance().getSomething(param); | |
} | |
}); | |
Template.home.events({ | |
"click #something": function (event, templ) { | |
templ.doSomething(event.currentTarget); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment