Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
AngularJS – isUndefined() method
The isUndefined() method in AngularJS basically checks if a reference is defined or not. This method will return True if the reference passed inside the function is not defined or undefined, else it will return False.
Syntax
angular.isUndefined(value)
Example − Check if the reference isUndefined or not
Create a file "isUndefined.html.3" in your Angular project directory and copy-paste the following code snippet.
angular.isUndefined() Welcome to Tutorials Point
AngularJS | angular.isUndefined()
Name: {{name}}
{{isUndefined}}
Name: {{name2}}
{{isUndefined1}}
Output
To run the above code, just go to your file and run it as a normal HTML file. You will see the following output on the browser window.

In the code, $scope.name is defined, whereas $scope.name2 is not undefined. Hence, we got this output.
Advertisements
