Does angularjs treates null as $scope.null? -
example question
<div ng-show="bar !== null">hello</div> is evaluated in scope as
$scope.bar !== null or this?
$scope.bar !== $scope.null note in last case, $scope.null undefined , example seem work right.
bonus:
if bar = null happens
// not work (shows hello) <div ng-show="bar !== null">hello</div> does not give same result as
// works ok (does not show hello) <div ng-show="bar != null">hello</div> why happen?
no, angular recognizes js primitives in expressions, , null among them.
Comments
Post a Comment