Question: how to check null and undefined in angularjs?
Answer: You can use angular's function called angular. isUndefined(value) returns boolean. if(!a) { // do something when `a` is not undefined, null, ''. } If the value is either undefined , null or '' then Case 1 otherwise for any other value of value Case 2.