我试图找出模型的所有远程方法和它的终点/属性?我怎样才能得到它在环回3?
还有在GitHub上类似的讨论:
以下是他们建议使用来获得所有特定模型中的远程方法的代码:
function getActiveRemoteMethods(model) {
const activeRemoteMethods = model.sharedClass
.methods({ includeDisabled: false })
.reduce((result, sharedMethod) => {
Object.assign(result, {
[sharedMethod.name]: sharedMethod.isStatic,
});
return result;
}, {});
return activeRemoteMethods;
}