fix(compiler): Safe property access expressions work in event bindings #11724

Merged
merged 1 commit into from Sep 20, 2016

Conversation

Projects
None yet
4 participants
@chuckjaz
Member

chuckjaz commented Sep 19, 2016

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x")

[x] Bugfix

What is the current behavior? (You can also link to an open issue here)

Safe property access expressions that need to be converted to statements (such as event bindings) are not correctly converted by the expression converter.

What is the new behavior?

Safe property access expressions are now correctly converted to statements when necessary.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

@googlebot googlebot added the cla: yes label Sep 19, 2016

+ click() {}
+ }
+
+ TestBed.configureTestingModule({declarations: [SomeComponent]});

This comment has been minimized.

@vicb

vicb Sep 19, 2016

Member

const fixture = Tb.configure().create();

@vicb

vicb Sep 19, 2016

Member

const fixture = Tb.configure().create();

@vicb

vicb approved these changes Sep 19, 2016

+ const fixture = TestBed.configureTestingModule({declarations: [SomeComponent]})
+ .createComponent(SomeComponent);
+
+ fixture.detectChanges(/* checkNoChanges */ false);

This comment has been minimized.

@vicb

vicb Sep 19, 2016

Member

expect(() => ...).not.toThrow()

@vicb

vicb Sep 19, 2016

Member

expect(() => ...).not.toThrow()

@vicb

vicb approved these changes Sep 20, 2016

@alexeagle alexeagle merged commit 131626f into angular:master Sep 20, 2016

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment