【发布时间】:2020-12-18 04:15:56
【问题描述】:
我正在使用 dx-scheduler 日历,并且我正在尝试对会议使用 crud 操作。我想知道如何使用 DevExpress.data.AspNet.createStore 中的函数而不是他们自己的 api 方法 - 这是他们 API 的一个示例:
DevExpress.data.AspNet.createStore({
key: "AppointmentId",
loadUrl: url + "/Get",
insertUrl: url + "/Post",
updateUrl: url + "/Put",
deleteUrl: url + "/Delete",
onBeforeSend: function(method, ajaxOptions) {
ajaxOptions.xhrFields = { withCredentials: true };
}
}),
我想实现这个:
DevExpress.data.AspNet.createStore({
key: "AppointmentId",
loadUrl: function(){
$http.get("/getApi").then(function(){
// manipulate the fetched data
})
},
insertUrl: : function(values){
// manipulate the values before post
$http.post("/getApi", values).then(function(){
}),
onBeforeSend: function(method, ajaxOptions) {
ajaxOptions.xhrFields = { withCredentials: true };
}
}),
【问题讨论】:
标签: angularjs devextreme