Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0
- id "1"
- name "Company-A21"
- address "Gany-A11"
- [{"id":"1","name":"Company-A21","address":"Gany-A11"]
- <!doctype html>
- <html >
- <head>
- <title>Hello AngularJS</title>
- <script src="hello.js"></script>
- </head>
- <body>
- <div ng-controller="Hello">
- <p>The ID is {{company.id}}</p>
- <p>The content is {{company.name}}</p>
- </div>
- </body>
- </html>
- angular.module('demo', [])
- .controller('Hello', function($scope, $http){
- $http.get('http://localhost:4567/api/v1/companies/2').
- then(function(response) {
- $scope.company = response.data;
- });
- });
Add Comment
Please, Sign In to add comment