Created
May 17, 2015 05:25
-
-
Save derekbassett/99f7d496370b1f21af9e to your computer and use it in GitHub Desktop.
Debugging Data Contexts in Meteor
This file contains hidden or 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
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