我可以在JAVA的帮助下将基于AngularJS的应用程序连接到Oracle数据库吗?我使用JAVA作为后端,所以需要连接AngularJS代码到数据库,这是在甲骨文,我正在使用sql developer来访问数据。
发布于 2014-06-05 00:08:02
正如其他人所提到的,是的,你可以。Angular依赖RESTful网络服务来请求和存储数据。您可以使用Spring Framework创建RESTful web服务,并通过POST/GET调用发送数据和检索数据。您需要有一个RESTful web服务。可以说Angular需要RESTful Web Service。
这就是Angular JS的美妙之处。RESTful WEB Service的实现取决于您。它可以在任何技术堆栈中。
发布于 2015-09-14 20:17:12
是的,你可以,但是你需要一个RESTful网络服务。
在你的.js上这样做:
app.controller('AppName', function($scope, $http){
$scope.datas = [];
$http.get('URI from Web Service')
.success(function(retorno){
$scope.datas = retorno.msg;
})
.error(function(error){
console.log(error);
});
});
https://stackoverflow.com/questions/24042130
复制相似问题