小编yes*_*ode的帖子

如何从Meteor.methods函数返回错误

如何从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)

谢谢!:)

meteor

15
推荐指数
1
解决办法
6817
查看次数

警告:无法写入"dest/full /"文件(错误代码:EISDIR)

我有一个警告:"无法写入"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)

当然我没有新文件.谢谢.

gruntjs

3
推荐指数
1
解决办法
2817
查看次数

标签 统计

gruntjs ×1

meteor ×1