Strapi.io Controller.find().exec(...)
Strapi.io Controller.find().exec(...)
我尝试使用controller.find().exc(…)方法,并在exec回调函数下尝试创建正文内容。但我不知道该怎么办。我想我必须在那里使用yield关键字,但如果我试图在回调函数中使用yield,它会导致一个错误。我的代码看起来像这样:
let value;
Firstcontroller.find().exec(function (error, result) {
value = yield result;
});
this.body = value;
我已经尝试过让步和不让步,让和不让步。还有一些选择。如果你有任何想法,请让我分享。我必须使用exec,因为我必须使用结果并将其传递给另一个find方法。
请尝试以下操作:
// Retrieve the value
const value = yield Firstcontroller.find();
// Set the value to the body
this.body = value;
相关文章:
- .Find()仅显示可见元素
- jQuery(this).Pparent().Pparente().Prent().find()在iPad上不起作用
- 从javascript regex.exec分配多个变量
- 他们是如何使用angular/jqLite find()方法按属性名称和值选择元素的?ng conf 2015
- jQuery find() Issue
- 使用jquery Find()在复选框中查找图像
- strongloop script.js run find in before delete方法:如何同步运行异步方法
- 在另一个Find(..)的回调内部查找,如何逃离回调地狱
- Node.js exec调用从不调用回调
- $(e.target).find和template.find('input').value之间有什么区别
- 为什么我得到了一个“;未定义的“;使用“”从Find()返回值;这个“;论点
- .map-find元素一旦通过AJAX加载
- MongoDB collection.find()查询挂起
- node exec()未触发所有数据事件
- 如何在jQuery中使用find
- 无法将参数传递给mongo find集合
- Ember.js-模型find()方法中的异步调用
- mongodb中db.collection.find()的返回类型是什么
- 如果限制超过某个数字,Mongoose find()永远不会到达exec块.似乎突然断开了连接
- Strapi.io Controller.find().exec(...)