如何从Meteor.methods函数返回错误?我叫我的功能:
Meteor.call('checkCode', mycode, function(error,result){
console.log(result['name']);
})
Run Code Online (Sandbox Code Playgroud)
它返回了我的"代码"与参数相同的人的名字.但如果没有人输入代码,如何返回错误?我的功能代码:
checkCode: function(zcode){
return Codes.findOne({code: zcode});
}
Run Code Online (Sandbox Code Playgroud)
谢谢!:)
我有一个警告:"无法写入"dest/full /"文件(错误代码:EISDIR)"而htmlrefs试图完成其任务.
htmlrefs: {
dist: {
/** @required - string including grunt glob variables */
src: 'src/*.html',
/** @optional - string directory name*/
dest: 'dest/full/',
options: {
/** @optional - references external files to be included */
/*
includes: {
analytics: './ga.inc' // in this case it's google analytics (see sample below)
},
*/
/** any other parameter included on the options will be passed for template evaluation */
buildNumber: 1
}
}
},
Run Code Online (Sandbox Code Playgroud)
当然我没有新文件.谢谢.