Attach a created/rendered/destroyed hook to all templates


#1

@aldeed Thanks very much for https://github.com/aldeed/meteor-template-extension

It’s great we have the extension, but it seems like lots of your features should belong in core.

Specifically about iterating hooks over all templates. Is this something that Meteor will integrate into the core in the future? Or will we always need to use the extension?

I’ve posted in several forums, and it seems like a case no one can quite solve simple (without your package).


Meteor nested template bug 1.1.0.2?
#2

See https://github.com/meteor/meteor/issues/3706


#3

Nice!
Would the inherit feature be the same as Template.onRendered() , a parent for all templates to inherit from?


#4

I’m not sure but probably.


#5

If anyone wants a short/mid-term solution you can take a look at the hack I used in my blaze-autofocus package — which goal is to automatically focus form fields with the autofocus tag attribute.


#6

Thanks, it’s most a way for how to hack a Template callbacks ))