You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Possible bug: Optional binding =? not required anymore in 1.4 where it is in 1.3 #13367
I noticed that there is a breaking change regarding =? between 1.3 and 1.4.
This example throws with an exception when you try to toggle the second zippy because it doesn't use the open binding and the binding isn't marked as optional. The example is based on 1.3.
But for some reason the handler never gets fired by the digest. I think this could be some optimisation that sees that the values are never going to change and so doesn't bother watching?
I wonder if that's really a bug or a feature? The question would be if there are any downsides of the behavior because for this example it turns out as something positive. It makes the example work out of the box without having to know about optional bindings.
Activity
petebacondarwin commentedon Nov 24, 2015
It seems that if the value is non-assignable we now never call the watch handler for setting the parent value.
We are still creating the correct
parentSetfunction, at https://github.com/angular/angular.js/blob/master/src/ng/compile.js#L2754, which will throw the exception.And we are still creating the watches correctly at https://github.com/angular/angular.js/blob/master/src/ng/compile.js#L2780
But for some reason the handler never gets fired by the digest. I think this could be some optimisation that sees that the values are never going to change and so doesn't bother watching?
petebacondarwin commentedon Nov 24, 2015
It appears between 1.4.0-beta.2 and 1.4.0-beta.3
petebacondarwin commentedon Nov 24, 2015
git bisecttells us that this bug did indeed appear in 6a38dbfcburgdorf commentedon Nov 24, 2015
I wonder if that's really a bug or a feature? The question would be if there are any downsides of the behavior because for this example it turns out as something positive. It makes the example work out of the box without having to know about optional bindings.
lgalfaso commentedon Nov 24, 2015
I think this is an oversight on the PR that @petebacondarwin pointed out.
fix($parse): handle interceptors with `undefined` expressions
fix($parse): handle interceptors with `undefined` expressions
test($compile): add test for undefined non-optional reference binding
test($compile): add test for undefined non-optional reference binding