Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

fix(bind-*): zone.run scope.apply on bind- change events #1448

Closed
wants to merge 1 commit into from

Conversation

rkirov
Copy link
Contributor

@rkirov rkirov commented Sep 11, 2014

Due to dart bug, events registered with addEventListener do no fire
scope.apply().

Adds an example of an affected polymer component.

@@ -309,6 +309,9 @@ class ElementBinder {
bindAssignableProps.forEach((propAndExp) {
propAndExp[1].assign(scope.context, jsNode[propAndExp[0]]);
});
// due to https://code.google.com/p/dart/issues/detail?id=17406
// we have to manually run the zone.
Zone.current.run(scope.apply);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run the entire addEventListener callback in a Zone.current.run; Angular will automatically apply().

You want to run it in the current Zone at the time or registration, so you'll need to store a reference to Zone.current.

Due to dart bug, events registered with addEventListener do no fire
scope.apply().

Adds an example of an affected polymer component.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

3 participants