我有一个device
模型,其中有一个(belongsTo
)ingest
模型。
在我的应用程序的其他地方,我已经device
加载了文件,并且需要知道设备上是否有ingest
礼物。我这样检查:
return this.get('device.ingest') === null;
通过调用device.ingest
,Ember自动向发出AJAX请求.find('ingest', device.ingest.id)
。我真的只是想知道它是否存在,我不想获取它。
我怎样才能做到这一点?
这不应该对您有用吗?
return this.get('device.data.ingest.id') === null /* or undefined */;
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句