From 71c67c2109284f6c4adfaa35609b67e66ed11b80 Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Wed, 15 Jul 2015 23:40:20 -0400 Subject: [PATCH] fix(view-compiler): template elements with template controllers work again Fixes #133 --- src/html-behavior.js | 3 ++- src/view-compiler.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/html-behavior.js b/src/html-behavior.js index 46d983ca..14284e83 100644 --- a/src/html-behavior.js +++ b/src/html-behavior.js @@ -119,7 +119,8 @@ export class HtmlBehaviorResource { viewStrategy = viewStrategy || this.viewStrategy || ViewStrategy.getDefault(target); options = { targetShadowDOM:this.targetShadowDOM, - beforeCompile:target.beforeCompile + beforeCompile:target.beforeCompile, + compileSurrogate:true }; if(!viewStrategy.moduleId){ diff --git a/src/view-compiler.js b/src/view-compiler.js index 4766b0ba..70c3865b 100644 --- a/src/view-compiler.js +++ b/src/view-compiler.js @@ -87,7 +87,7 @@ export class ViewCompiler { content.appendChild(document.createComment('')); var factory = new ViewFactory(content, instructions, resources); - factory.surrogateInstruction = templateOrFragment.content ? this.compileSurrogate(templateOrFragment, resources) : null; + factory.surrogateInstruction = options.compileSurrogate ? this.compileSurrogate(templateOrFragment, resources) : null; if(part){ factory.part = part;