javascript - Ember:将模型数据设置为组件值?
问题描述
我试图将模型数据设置为 ember 组件数据。但它没有用。
actions: {
setValue(modelData, type) {
// this doesn't work
this.set('currentType', type);
this.set('currentData', modelData);
// this also doesn't work
this.setProperties({
currentType: type,
currentData: modelData
});
}
}
并得到了这个错误
解决方案
推荐阅读
- sql - SELECT WHERE 多条记录不存在
- google-sheets - 无法弄清楚为什么这个 summif 语句不起作用
- php - 数组行正在覆盖另一行
- kubernetes - 识别 ISTIO 服务网格中的调用服务
- r - 从 PDF 中提取文本 - Rstudio
- azure-devops - 无法检查资源组状态:通过服务主体/连接使用 CD 管道部署 ARM 模板时出现 403
- vb.net - 如何在VB中对会话超时进行单元测试?
- typescript - 基于实例属性值的类属性类型保护
- bash - docker-compose down 不会通过两层 bash 脚本级联下 SIGTERM
- sql - 如何计算 SQL 中多列的中位数?