Sì, l'ho fatto !!!
var app = angular.module( 'ngApp', ['ngGrid'] );
app.controller('appController'
, funzione ($ scope, $ http) {
initializeScope ($ scope);
$scope.GetData = function () {
$scope.qryStr = ( function ()
{
// bldg your qry ... ;
})();
var config = { header: { "Content-Type": "application/json; charset=utf-8" }, xhrFields: {withCredentials: "true"} };
var qryStr = JSON.stringify( $scope.qryStr );
$http.post( RESTUrl, qryStr, config )
.success( function ( response, status, headers, config ) {
$scope.gridOptions = {
data: response
, showGroupPanel: true
};
})
.error(function (response, status, headers, config) {
alert(qryStr+ " is failing!");
$scope.errmsg = "<hr />status: " + status +
"<hr />headers: " + headers ;
});
}; //GetData
});
HTML ::: >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="script/jquery-2.1.0.js"></script>
<script src="script/angular.js"></script>
<script type="text/javascript" src="JS/appController.js"></script>
</head>
<body ng-app="ngApp" >
<form ng-submit="GetData()" ng-controller="appController">
<div id="div_srchForm"> {{ ... your ng templates }} </div>
<div id="doMySubmit"><button type="submit">Submit</button></div>
<div class="gridStyle" ng-grid="gridOptions"></div>
<div id="div_err">{{errmsg}}</div>
</form>
</body>
</html>