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
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

angular.html 636B

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