Tutorialsplane

angular.copy


angular.copy Function – It basically creates the copy of the source array or object. The syntax for angular copy function is angular.copy(source, [destination]); where source will be copied into destionation.
source and destionation both must be of the same type.

Here in this tutorial we are going to explain the ng function component with example and demo. You can use our online editor to edit and run the example.


angular.copy Syntax | Example | Demo

Syntax

Syntax of angular copy function is as –

angular.copy Syntax :

angular.copy(source, [destination]);

Arguments

Example

Here is simple example of angular copy function-

angular.copy Example :




 
 

  
<div ng-app="myApp">  
<div ng-controller="myController"> 
 
 
</div>
</div>
<p><br/>
      </p>

Try it »

AngularJs Api Refrence

AngularJs Directive