How to get the parent template instance (of the current template)

前端 未结 5 2157
抹茶落季
抹茶落季 2020-12-03 10:55

Is there a clean way to get the parent template of the current template? Nothing is officially documented in Meteor\'s API. I\'m talking about the Blaze.TemplateInstan

5条回答
  •  隐瞒了意图╮
    2020-12-03 11:36

    You can use a package like Aldeed's template-extension

    The following method is available there:

    templateInstance.parent(numLevels, includeBlockHelpers)
    

提交回复
热议问题