check null,empty or undefined angularjs

前端 未结 7 473
广开言路
广开言路 2021-02-02 07:34

I am creating a project using angularjs.I have variable like

$scope.test = null
$scope.test = undefined
$scope.test = \"\"

I want to check all

7条回答
  •  渐次进展
    2021-02-02 08:14

    You can use angular's function called angular.isUndefined(value) returns boolean.

    You may read more about angular's functions here: AngularJS Functions (isUndefined)

提交回复
热议问题