Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.72 KB | None | 0 0
  1. <html>
  2. <style>
  3.  
  4. </style>
  5.     <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.8/angular.min.js"></script>
  6.   <body>
  7.     <div ng-app="country-output" ng-controller="controller">
  8.       <table>
  9.         <tr ng-repeat="i in data">
  10.           <td>{{ i.Country }}</td>
  11.           <td>{{ i.Name }}</td>
  12.         </tr>
  13.       </table>
  14.     </div>
  15.     <script>
  16.       var app = angular.module('country-output', []);
  17.       app.controller('controller', function($scope, $http){
  18.         $http.get("https://www.w3schools.com/angular/customers.php").then(function (response){
  19.           $scope.data = response.data.records;
  20.           console.log(response.data);
  21.         });
  22.       });
  23.     </script>
  24.   </body>
  25. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement