Skip to content

Instantly share code, notes, and snippets.

@derekbassett
Created May 17, 2015 05:25
Show Gist options
  • Select an option

  • Save derekbassett/99f7d496370b1f21af9e to your computer and use it in GitHub Desktop.

Select an option

Save derekbassett/99f7d496370b1f21af9e to your computer and use it in GitHub Desktop.

Revisions

  1. derekbassett created this gist May 17, 2015.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    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>