api de gestion de ticket, basé sur php-crud-api. Le but est de décorrélé les outils de gestion des données, afin
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

client_angular.html 709B

12345678910111213141516171819202122232425
  1. <html>
  2. <head>
  3. <script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
  4. <script src="../lib/php_crud_api_transform.js"></script>
  5. <script>
  6. var app = angular.module('myApplication', []);
  7. app.controller('postController', function($scope, $http) {
  8. var url = '../api.php/posts';
  9. $http.post(url, {user_id: 1, category_id: 1, content: "from angular"}).success(function() {
  10. $http.get(url).success(function(response) {
  11. $scope.posts = php_crud_api_transform(response).posts;
  12. });
  13. });
  14. });
  15. </script>
  16. </head>
  17. <body>
  18. <div ng-app="myApplication" ng-controller="postController">
  19. <ul>
  20. <li ng-repeat="x in posts">{{ x.id + ', ' + x.content }}</li>
  21. </ul>
  22. </div>
  23. </body>
  24. </html>