![]() |
VOOZH | about |
Global API in AngularJS: API stands for Application Programming Interface. It is a set of protocols, routines, and tools for building software applications that allow the user to interact with the application and perform several tasks. In AngularJS Global API is a set of global Javascript functions used for performing tasks like comparing objects, iterating objects, and converting data.
👁 ImageSome API functions in AngularJS are shown below:
angular.lowercase: This is a built-in filter that is used to transform any string into lowercase.
Syntax:
angular.lowercase(string);
Example 1: This example describes the basic usage of the Global API that is utilized to convert the string to lowercase.
Output:
Before Conversion: GeeksforGeeks After Conversion: geeksforgeeks
angular.uppercase: This is a built-in filter that is used to transform any string into uppercase.
Syntax:
angular.uppercase(string);
Example 2: This example describes the basic usage of the Global API that is utilized to convert the string to uppercase.
Output:
Before Conversion: geeksforgeeks After Conversion: GEEKSFORGEEKS
angular.isString: This is a built-in filter that is used to check whether the given value is a string or not, if the value is a string then it returns true else it returns false.
Syntax:
angular.isString(value);
Example 3: This example describes the use of the Global API that is utilized to check whether the entered value is a string or not.
Output:
Value is: 15 Value is String: false
angular.isNumber: This is a built-in filter that is used to check whether the given value is a number or not, if it is a number then it returns true else it returns false.
Syntax:
angular.isNumber(value);
Example 4: This example describes the use of the Global API that is utilized to check whether the given value is a number or not.
Output:
Value is: 15 Value is Number: true
There are several other Global APIs, which are described below: