Angular Built in Functions

Angular Built in Functions

Today, We want to share with you Angular Built in Functions.
In this post we will show you Angular Built in Functions, hear for Angular Built in Functions we will give you demo and example for implement.
In this post, we will learn about Angular Built in Functions with an example.

AngularJS Built in Functions

Here is a simple list of All built-in functions with description.

Function Description
lowercase This function is intended to converts the specified string to lowercase.
uppercase This function is intended to converts the specified string to uppercase.
forEach This function is intended to iterator the each items in array.
extend This function is intended to extend the destination object by copying the enumerable properties of object ie. var obj = angular.extend({}, obj1, obj2).
merge This function is intended to deeply extend the destination object by copying the enumerable properties of object ie. var obj = angular.merge({}, obj1, obj2).
noop This function performs no operations, can be useful when writing code in the functional style.
identity This function returns its first argument, can be useful when writing code in the functional style.
isUndefined Angularjs function is basically identify if a reference is undefined.
isDefined Angularjs function is basically identify if a reference is defined.
isObject Angularjs function is basically identify if a reference is object, nulls are not considered to be objects.
isString Angularjs function is basically identify if a reference is string.
isNumber Angularjs function is basically identify if a reference is number.
isDate Angularjs function is basically identify if a value is date.
isArray Angularjs function is basically identify if a reference is array.
isFunction Angularjs function is basically identify if a reference is function.
isElement Angularjs function is basically identify if a reference is DOM element.
copy This function is intended to creates a deep copy of source object or an array.
equals Angularjs function is basically identify two objects or two values are equivalent, it supports value types, regular expressions, arrays and objects.
bind Allows to work with partial functions.
toJson This function is intended to serializes input into a JSON-formatted string.
fromJson This function is intended to deserializes a JSON string.
bootstrap This function is intended to manually start up angular application.
reloadWithDebugInfo This function is intended to reload the current application with debug information turned on.
injector This function is intended to creates an injector object that can be used for retrieving services as well as for dependency injection.
element This function is intended to wraps a raw DOM element or HTML string as a jQuery element.
modul This function is a global place for creating, registering and retrieving Angular modules.
READ :  Vuejs Expressions – Numbers Strings Objects Array eval using Vuejs

AngularJS LowerCase Function

Syntax

    angular.lowercase(str);  

Example :

    
var str = "WWW.infinityknow.COM";    
document.write(angular.lowercase(str) + "</br>");    
var name = "Ravi Patadiya";    
    
if(angular.lowercase(name) == "Ravi Patadiya")    
    document.write("The String are Equal");    
else    
    document.write("String are Not Equal");    
    
  

AngularJS UpperCase Function : Example

Syntax

    angular.uppercase(str);  

Example

    
var str = "www.infinityknow.com";    
document.write(angular.uppercase(str) + "</br>");    
var name = "infinityknow";    
if(angular.uppercase(name) == "infinityknow")    
    document.write("String are Equal");    
else    
    document.write("Not Equal");    
  

AngularJS Module Function : Example

Syntax

angular.module(name, [requires], [configFn]);  

Example

  
//simple Defining Controller Using AngularJS Module  
var app = angular.module('yourApp', []);  
    app.controller('yourController', function($scope) {  
        $scope.customer = { name: "angular king", address: "9-old ram park kothariya", email: "[email protected]" };  
    });  
 

Add a Comment

Your email address will not be published. Required fields are marked *