Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
AngularJS与JAVA中的数据库连接_Angularjs - Fatal编程技术网

AngularJS与JAVA中的数据库连接

AngularJS与JAVA中的数据库连接,angularjs,Angularjs,我可以借助JAVA将基于AngularJS的应用程序连接到Oracle数据库吗? 我使用JAVA作为后端,所以需要将AngularJS代码连接到oracle中的数据库,并且我使用sql developer访问数据。正如其他人提到的,是的,您可以。 Angular依赖RESTfulWeb服务来请求和存储数据。您可以使用创建RESTful web服务,并通过POST/GET调用发送数据和检索数据。您需要有一个RESTful web服务。可以说Angular需要RESTfulWeb服务 这真的是角JS

我可以借助JAVA将基于AngularJS的应用程序连接到Oracle数据库吗?
我使用JAVA作为后端,所以需要将AngularJS代码连接到oracle中的数据库,并且我使用sql developer访问数据。

正如其他人提到的,是的,您可以。 Angular依赖RESTfulWeb服务来请求和存储数据。您可以使用创建RESTful web服务,并通过POST/GET调用发送数据和检索数据。您需要有一个RESTful web服务。可以说Angular需要RESTfulWeb服务


这真的是角JS的美。RESTfulWeb服务的实现取决于您。它可以在任何技术堆栈中。

是的,您可以,但您需要一个RESTful Web服务

在您的.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); 
   }); 
});