once(...
作品。我读过很多关于这个曾经解释过的例子的描述,但并没有真正地把它用在节俭的例子中。
NodeJS服务器端
get_max: function(path_input, property_input,result) {
console.log("get_max(", path_input, ",", property_input, ")");
//how do I get the result, to have val attached ?
max.get({
path: path_input,
property: property_input
}).once(property_input, function(val) {
result(null, val)
});
}
});