0
dxDataGrid를 사용하여 WebApi (MVC .그물). 우리 서버에서 GET 함수가 처음으로 올바르게 트리거 된 다음 모든 것이 혼란스러워집니다. POST, DELETE, DELETE의 요청 컨트롤러에 호출이 전혀 없더라도 서버는 POST, DELETE, GET에서 무한 호출을받습니다. 아래 이미지에서 오류
[$ rootScope : infdig] 10 $ digest() 반복에 도달했기 때문에 분명히 루프가 발생했습니다. 중단합니다!
요청 컨트롤러 JS 코드 :
angular.module('wdfApp.controllers')
.controller('RequestListCtrl', ['$scope', '$http', 'Request', function ($scope, $http, Request) {
var customStore = new DevExpress.data.CustomStore({
load: function (loadOptions) {
var query = Request.query();
return query.$promise;
}
});
$scope.dataGridOptions = {
dataSource: customStore,
remoteOperations:false
,
loadPanel: {
enabled: false
},
scrolling: {
mode: "virtual"
},
sorting: {
mode: "none"
}
};
}]);
요청 서비스 JS 코드 :
angular.module('wdfApp.services')
.factory('Request', ['$resource',
function ($resource) {
return $resource('/api/requests/:request');
}]);