longshotlabs / meteor-template-extension

A Meteor package: Replace already defined templates, inherit helpers and events from other templates
https://atmospherejs.com/aldeed/template-extension
MIT License
220 stars 20 forks source link

template-children prototype #44

Closed JoeyAndres closed 8 years ago

JoeyAndres commented 8 years ago

Allows Templates to keep track of children templates via

Template.instance().getChildren();  // Reactive.
Template.instance().children();  // Non-reactive.

This keeps track of the template ordering in DOM, thus when ordering change, templates are changed accordingly. This also adds global hooks for onCreated, onRendered, onDestroyed, to help with children book keeping.

This is still a prototype and I need this to be tested. There are lots of optimization that can be done, but I need this to be correct first.