Home
Run >
<!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 Merge Function</legend> <script> var sourceObj1 = {'name' : 'Jimi'} ; var sourceObj2 = {'address' : '12-13/A12','zip': '21333'} ; var myDest = {} ; angular.merge(myDest, sourceObj1,sourceObj2) ; document.write(myDest.name); document.write(""); document.write(myDest.address); document.write(""); document.write(myDest.zip); </script> </fieldset> </body> </html>