-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix($parse): Make sure ES6 object computed property to be watched #15637
fix($parse): Make sure ES6 object computed property to be watched #15637
Conversation
Adding the missing watches for ES6 object property which added in angular#14407
it('should watch ES6 object computed property changes', function() { | ||
var count = 0; | ||
var values = []; | ||
var firstValue = {'undefined': true}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem necessary. I think it's better to inline the object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gkalpak fixed.
var values = []; | ||
var firstValue = {'undefined': true}; | ||
|
||
scope.$watch('{[a]: true}', function(val, oldVal) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Remove unused arg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gkalpak fixed.
@gkalpak because I'm using v1.5.x now, so I just submit this PR to v1.5.x . |
@kindy we are branching and merging bug fixes from / to master and backport them manually to 1.5.x, so yes a PR that branches from master is preferred. Just open a new one with the updated code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but ideally @lgalfaso should take a look too 😃
@lgalfaso can you help review this PR? |
LGTM, *@gkalpak can you please merge this?*
|
@kindy, can you please rebase this on master? |
Thx! Closing in favor of #15678. |
Adding the missing watches for ES6 object property which added in #14407
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix
What is the current behavior? (You can also link to an open issue here)
$scope.$watch
can not work as expected.What is the new behavior (if this is a feature change)?
$scope.$watch
works (NOT a feature change)Does this PR introduce a breaking change?
NO
Please check if the PR fulfills these requirements
Other information: