我如何使用xampp的angularjs,但没有node.js服务器通信?

我为我的编程Web应用程序使用基本的xampp直到现在我已经使用php的相同。

但是现在我已经切换到了angularjs

没有nodejs的服务器通信教程,我看不到任何地方

因为我不习惯使用nodejs,因为现在我想要为web应用程序直接使用angularjs; 比如提取和添加数据到数据库中。

<body id="index" ng-app="notesApp" > <h1>Hello servers!</h1> <div ng-controller="maincntrl as cntrl" ng-repeat="todo in cntrl.items" class="item"> <div><span ng-bind="todo.label"></span></div> <div>- <span ng-bind="todo.author"></span></div> </div> <script> angular.module('notesApp',[]) .controller('mainCntrl',['$http', function($http){ var self= this; self.items = []; $http.get('/api/note').then(function(response){},function(errResponse){ console.error("error while fetching note"); }); }]); </script> </body> 

这个代码不工作

关键是,Angular JS是一个客户端框架。 不要紧,你在服务器端使用什么。

这里是一个使用PHP进行服务器通信的例子。

http://www.w3schools.com/angular/angular_sql.asp