fix(compiler): elements with events only create binders but not protoElementInjectors.

Closes #577
This commit is contained in:
Rado Kirov
2015-02-10 14:43:59 -08:00
parent dd532fee72
commit 6e923cbf84
2 changed files with 31 additions and 6 deletions

View File

@ -98,7 +98,13 @@ export class ElementBinderBuilder extends CompileStep {
var elementBinder = null;
if (current.hasBindings) {
var protoView = current.inheritedProtoView;
elementBinder = protoView.bindElement(current.inheritedProtoElementInjector,
var protoInjectorWasBuilt = isBlank(parent) ? true :
current.inheritedProtoElementInjector !== parent.inheritedProtoElementInjector;
var currentProtoElementInjector = protoInjectorWasBuilt ?
current.inheritedProtoElementInjector : null;
elementBinder = protoView.bindElement(currentProtoElementInjector,
current.componentDirective, current.templateDirective);
if (isPresent(current.textNodeBindings)) {