AngularJs Tables
home
Run
screen_rotation
fullscreen
cloud_download
navigate_before
navigate_next
<!DOCTYPE html> <html lang="en"> <head> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script> <style> table, tr, td{ border:1px solid #333; padding:4px; } </style> </head> <body> <div ng-app="userApp" ng-controller ="userController"> <table> <tr><th>Id</th><th>Name</th></tr> <tr ng-repeat="data in usersData"> <td>{{data.id}}</td> <td>{{data.name}}</td> </tr> </table> </div> <script> var app = angular.module('userApp', []); app.controller('userController', function($scope, $http) { $http.get("http://runtest.tutorialsplane.com/json/getUsers.php") .success(function(response) {$scope.usersData = response.users;}); }); </script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script> <style> table, tr, td{ border:1px solid #333; padding:4px; } </style> </head> <body> <div ng-app="userApp" ng-controller ="userController"> <table> <tr><th>Id</th><th>Name</th></tr> <tr ng-repeat="data in usersData"> <td>{{data.id}}</td> <td>{{data.name}}</td> </tr> </table> </div> <script> var app = angular.module('userApp', []); app.controller('userController', function($scope, $http) { $http.get("http://runtest.tutorialsplane.com/json/getUsers.php") .success(function(response) {$scope.usersData = response.users;}); }); </script> </body> </html>
Copyrights@tutorialsplane.com