Skip to content
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
@spamdaemon

Description

@spamdaemon

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions