我在服务器端的delphi XE7中创建了一个DataSnap。我尝试在客户端创建一个AngularJS应用程序来使用服务器端的服务。但没有找到关于此的文档,我的客户端应用程序无法正常工作。在调试模式下,消息" ReferenceError:TServerMethod1未定义"。
线错误是这样的:
this._proxy = new TServerMethod1(DSConnectionInfo);
完整的AngularJS代码如下:
var module = angular.module('AngularIntro', []);
module.value('DSConnectionInfo', {host:'localhost',port:'8089'})
module.factory('DataSnap', function(DSConnectionInfo){
if (!("_proxy" in this))
this._proxy = new TServerMethod1(DSConnectionInfo);
return this._proxy;
})
module.controller('myController', function($scope, DataSnap){
$scope.customers = DataSnap.GetCustomers(1).result;
});
请帮忙!!!!和坦克!!!!