VOOZH about

URL: https://www.geeksforgeeks.org/angular-js/angularjs-angular-isdefined-function/

⇱ AngularJS angular.isDefined() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

AngularJS angular.isDefined() Function

Last Updated : 6 Sep, 2022

The angular.isDefined() function in AngularJS is used to determine the value inside isDefined function is defined or not. It returns true if the reference is defined otherwise returns false

Syntax:

angular.isDefined( value );

Parameter value:

  • value: This parameter is a reference to check whether the entered value is defined or not.

Return Value: It returns true if the passed value is defined otherwise returns false

Example: This example uses angular.isDefined() function to determine the value inside isDefined function is defined or not. 

Output:

  • Date is not Defined:

👁 isDefined

  • If Date is defined and its value is "2019-04-07T23:46:20.586":

👁 isDate

Example 2: This example describes the usage of angular.isDefined() Function in AngularJS by specifying the current time.

Output:

  • Time is not Defined:
👁 Image
 
  • When Time is defined:
👁 Image
 
Comment

Explore