This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
One-time binding deep-copies an object #7907
Closed
Description
I have noticed that one-time binding with ::
always wants to deep-copy objects in an expression, whereas normal binding will simply store and compare a reference.
Minimal example: http://jsfiddle.net/mhelvens/PXdkK/1/
This example demonstrates the inconsistent behavior by binding to an object that holds a reference to a $scope
. The one-time binding prompts an ng:cpws
error, indicating that a deep copy is being made.
I would prefer the traditional behavior for various reasons. But in any case, I assume that this inconsistency was not deliberate.