diff --git a/modules/angular2/src/render/dom/view/proto_view_merger.ts b/modules/angular2/src/render/dom/view/proto_view_merger.ts index abe275a64d..f977ecc315 100644 --- a/modules/angular2/src/render/dom/view/proto_view_merger.ts +++ b/modules/angular2/src/render/dom/view/proto_view_merger.ts @@ -27,6 +27,9 @@ export function mergeProtoViewsRecursively(protoViewRefs: List>, } } +function markBoundTextNodeParentsAsBoundElements(mergableProtoViews: ClonedProtoView[]) { + mergableProtoViews.forEach((mergableProtoView) => { + mergableProtoView.boundTextNodes.forEach((textNode) => { + var parentNode = textNode.parentNode; + if (isPresent(parentNode) && DOM.isElementNode(parentNode)) { + DOM.addClass(parentNode, NG_BINDING_CLASS); + } + }); + }); +} + function indexBoundTextNodes(mergableProtoViews: ClonedProtoView[]): Map { var boundTextNodeMap = new Map(); for (var pvIndex = 0; pvIndex < mergableProtoViews.length; pvIndex++) { diff --git a/modules/angular2/test/render/dom/view/proto_view_merger_integration_spec.ts b/modules/angular2/test/render/dom/view/proto_view_merger_integration_spec.ts index 0bc52e73aa..952f7bd3e8 100644 --- a/modules/angular2/test/render/dom/view/proto_view_merger_integration_spec.ts +++ b/modules/angular2/test/render/dom/view/proto_view_merger_integration_spec.ts @@ -98,6 +98,11 @@ export function main() { 'root', ['{{b}}', 'A()'], ['A({0})'])); + it('should project text interpolation to elements without bindings', + runAndAssert('root', ['{{b}}', '
'], [ + '
{0}
' + ])); + it('should project elements', runAndAssert('root', ['
', 'A()'], [ 'A(
)
'