var app=angular.module('ssbank',['ngResource']);
以下代码用于启用跨源请求
app.config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}
]);
app.controller('bankcontroller',function($scope,$http,$resource){
var user=$resource("http://localhost:9080/RestService/hello");
$scope.data=user.get();
});