Created
August 2, 2017 15:31
-
-
Save jirikrepl/4e40b895ac0a9b97e99e27cc63c1e602 to your computer and use it in GitHub Desktop.
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
Template consultant_sidebarStatus used somewhere with this context ... | |
{{> consultant_sidebarStatus consultant=consultant}} | |
How template consultant_sidebarStatus looks like | |
<template name="consultant_sidebarStatus"> | |
{{goldStatus}} | |
{{#with x=1}} | |
{{goldStatus}} | |
{{/with}} | |
</template> | |
// template helpers | |
Template.consultant_sidebarStatus.helpers({ | |
goldStatus() { | |
console.log(Template.currentData()); // this should be reactive | |
console.log(this); // this should be reactive | |
console.log(Template.instance().data); // this should be non-reactive | |
}, | |
}); | |
// log for first helper call | |
Object {consultant: Object} | |
Object {consultant: Object} | |
Object {consultant: Object} | |
// helper called inside #with | |
Object {x: 1} | |
Object {x: 1} | |
Object {consultant: Object} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment