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.
$watch/$eval expressions produce null unexpectedly #2249
Closed
Description
Given this small fragment in a controller:
$scope.foo = null;
$scope.$watch("foo.bar",function(nv) {
$log.info(nv);
});
produces 'null'
whereas
$scope.foo = {};
$scope.$watch("foo.bar",function(nv) {
$log.info(nv);
});
produces 'undefined'
If I try to $eval the expressions I get 'null' and 'undefined', respectively, as well.
This seems to be somewhat inconsistent.
I'm using version 1.0.5