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
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

client_angular.html 710B

123456789101112131415161718192021222324
  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>