diff --git a/modules/angular2/src/core/change_detection/codegen_logic_util.ts b/modules/angular2/src/core/change_detection/codegen_logic_util.ts index 17cf95cfc2..5da262e7b0 100644 --- a/modules/angular2/src/core/change_detection/codegen_logic_util.ts +++ b/modules/angular2/src/core/change_detection/codegen_logic_util.ts @@ -103,7 +103,7 @@ export class CodegenLogicUtil { break; case RecordType.Chain: - rhs = 'null'; + rhs = `${getLocalName(protoRec.args[protoRec.args.length - 1])}`; break; default: diff --git a/modules/angular2/test/core/change_detection/change_detector_config.ts b/modules/angular2/test/core/change_detection/change_detector_config.ts index 20260ed2da..50597aefe7 100644 --- a/modules/angular2/test/core/change_detection/change_detector_config.ts +++ b/modules/angular2/test/core/change_detection/change_detector_config.ts @@ -438,6 +438,7 @@ var _availableEventDefinitions = [ '(event)="a[0]=\$event"', // '(event)="\$event=1"', '(event)="a=a+1; a=a+1;"', + '(event)="true; false"', '(event)="false"', '(event)="true"', '(event)="true ? a = a + 1 : a = a + 1"', diff --git a/modules/angular2/test/core/change_detection/change_detector_spec.ts b/modules/angular2/test/core/change_detection/change_detector_spec.ts index 4253fd16ff..0613abea7c 100644 --- a/modules/angular2/test/core/change_detection/change_detector_spec.ts +++ b/modules/angular2/test/core/change_detection/change_detector_spec.ts @@ -1358,6 +1358,10 @@ export function main() { val = _createChangeDetector('(event)="true"', d, null); res = val.changeDetector.handleEvent("event", 0, event); expect(res).toBe(true); + + val = _createChangeDetector('(event)="true; false"', d, null); + res = val.changeDetector.handleEvent("event", 0, event); + expect(res).toBe(false); }); it('should support short-circuiting', () => {