Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Online AngularJS Editor

<!doctype html>
<html ng-app="myapp">
  <head>

	<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>  </head>
  <body ng-controler="mycontroller">
	<ul>
		<li ng-repeat="u in users">{{u.name}}</li>
	</ul>
<script>
	var app = angular.module("myapp", []);
	app.controller("mycontroller",function($scope, $http){
		$http.get("https://jsonplaceholder.typicode.com/users")
		.then(function(result){
			$scope.users = result;
		});

	});
</script>
  </body>
</html>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.