<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Welcome in the AngularJS</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script></head><body ng-app="app"> <div ng-controller="forEachController"> <p ng-repeat="pr in prop">Properties: {{pr}}</p> <p ng-repeat="vl in val">Value: {{vl}}</p> {{obj}} </div></body></html><script> var app = angular.module("app", []); app.controller('forEachController', ['$scope', function ($scope) { $scope.prop = []; $scope.val = []; $scope.obj = []; angular.forEach([{ name: 'Todd', location: 'UK' },{ name: 'Todd', location: 'UK' }], function (value, prop, obj) { $scope.val.push(value); $scope.prop.push(prop); $scope.obj.push(obj); }); }]);
</script>
<!DOCTYPE html> <html ng-app="" xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- www.techstrikers.com --> <title>My first AngularJS code</title> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script></head> <body bgcolor="#bnde45"> <script> angular.forEach([{ name: 'Todd', location: 'UK' },{ name: 'Todd', location: 'UK' }], function (value, prop, obj) { document.write(value); document.write(prop); document.write(obj); }); </script> </body> </html>--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/2e7Pj9oTow4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.