AngularJS isFunction
function is used to identify if a reference is function or not. This function return true
if reference is function.
Syntax
angular.isFunction(value);
<!DOCTYPE html> <html ng-app=""> <head> <!-- www.techstrikers.com --> <title>My first AngularJS code</title> <script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"> </script> </head> <body bgcolor="#bnde45"> <fieldset> <legend>AngularJS IsFunction Function</legend> <script> function siteName() { return "www.techstrikers.com"; } var sourceObj1; var str = "www.techstrikers.com"; document.write(angular.isFunction(siteName)); document.write("</br>"); document.write(angular.isFunction(str)); </script> </fieldset> </body> </html>See Live Example