knockout/knockout — pull request #1665 by saynomoo (2014-12-29 08:39:48+00:00)
Title: Component transclusion

Implementation of component transclusion, described for example in #1592. The transclusion code is taken from https://github.com/lelandrichardson/knockout-components

The implementation is done by first exposing the function cloneTemplateIntoElement into ko.components namespace, then the transclusion module replaces that function (in monkeyPatch.js). That is the only required change in the existing code to make the transclusion available.

To make the transclusion-enabled components more flexible, the defaultLoader was also changed a bit: The component definition may provide method findContent, which will allow programmatic use of composable components.

The features implemented in this pull request have been fully tested in transclusionBehaviors.js