Is there a predefind function to check for null, undefined, or blank variables in angularjs? -
<div ng-if='documentdata.addresseslist[0] == undefined ||documentdata.addresseslist[0] == "" || documentdata.addresseslist[0] == null'> view </div>
or other way create user defined function checks these 3 condition in once.
you can use function check wether object defined or not (is null or undefined):
angular.isdefined(value);
https://docs.angularjs.org/api/ng/function/angular.isdefined
according edit, can use
<div ng-if='documentdata.addresseslist[0]'>view</div>
in view
Comments
Post a Comment