Skip to content

Instantly share code, notes, and snippets.

@derekbassett
Created May 17, 2015 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derekbassett/99f7d496370b1f21af9e to your computer and use it in GitHub Desktop.
Save derekbassett/99f7d496370b1f21af9e to your computer and use it in GitHub Desktop.
Debugging Data Contexts in Meteor
Alternatively, if you need to find out more about the data context of a specific template fragment, you can also write a dedicated {{log}} helper:
Template.profile.helpers({
log: function () {
console.log(this);
}
});
And use it directly in your templates:
<template name="profile">
{{#with profile}}
{{log}}
<img src="{{avatar}}"/>
<p>{{name}}</p>
{{/with}}
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment