![]() |
VOOZH | about |
The angular.equals() Function in AngularJS is used to compare two objects or two values whether these are the same or not. If the two values are the same, it returns TRUE else it will return FALSE. The angular.equals() Function supports value types, regular expressions, arrays and objects.
Syntax:
angular.equals(val1, val2);
Parameter value:
Return Value: Returns a boolean value ie either TRUE or FALSE.
Example 1: This example illustrates the implementation of the angular.equals() Function in AngularJS, by comparing the values.
Output:
Example 2: This example illustrates the implementation of the angular.equals() Function in AngularJS, by verifying its value type to authenticate the password.
Output: