diff --git a/modules/@angular/compiler/src/view_compiler/property_binder.ts b/modules/@angular/compiler/src/view_compiler/property_binder.ts index a9426893bc..dbf1f7d108 100644 --- a/modules/@angular/compiler/src/view_compiler/property_binder.ts +++ b/modules/@angular/compiler/src/view_compiler/property_binder.ts @@ -54,6 +54,9 @@ export function bindRenderInputs( view.detectChangesRenderPropertiesMethod.resetDebugInfo(compileElement.nodeIndex, boundProp); const evalResult = convertPropertyBinding( view, view, compileElement.view.componentContext, boundProp.value, bindingField.bindingId); + if (!evalResult) { + return; + } var checkBindingStmts: o.Statement[] = []; var compileMethod = view.detectChangesRenderPropertiesMethod; switch (boundProp.type) { diff --git a/modules/@angular/core/test/linker/change_detection_integration_spec.ts b/modules/@angular/core/test/linker/change_detection_integration_spec.ts index 877ad2c98f..7294c2c9e3 100644 --- a/modules/@angular/core/test/linker/change_detection_integration_spec.ts +++ b/modules/@angular/core/test/linker/change_detection_integration_spec.ts @@ -427,6 +427,14 @@ export function main() { })); + it('should ignore empty bindings', fakeAsync(() => { + var ctx = _bindSimpleProp('[someProp]', TestData); + ctx.componentInstance.a = 'value'; + ctx.detectChanges(false); + + expect(renderLog.log).toEqual([]); + })); + it('should support interpolation', fakeAsync(() => { var ctx = _bindSimpleProp('someProp="B{{a}}A"', TestData); ctx.componentInstance.a = 'value';