peerlibrary / meteor-blaze-components

Reusable components for Blaze
http://components.meteorapp.com/
BSD 3-Clause "New" or "Revised" License
354 stars 26 forks source link

Get vanilla Blaze Template instance from a child Blaze Component? #63

Closed rclai closed 9 years ago

rclai commented 9 years ago
<template name="vanillaBlaze">
  {{> someBlazeComponent}}
</template>
BlazeComponent.extendComponent({
  someMethod: function () {
    var parentTemplateInstance = ''; // How to get `vanillaBlaze` template instance?
  }
}).register('someBlazeComponent');

this.componentParent did not work.

mitar commented 9 years ago

You should not want that. ;-)

But otherwise I would do this._componentInternals.templateInstance.parent() using aldeed:template-extension.

rclai commented 9 years ago

I know but I was asking for someone else, but he decided to just pass the data into the component.