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

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -