所以我按照http://edgycircle.com/blog/2014-using-fixtures-in-combination-with-ember-cli/
的说明进行操作但是,我不清楚的是指定使用DS.FixtureAdapter.extend();
我尝试将它放在app / adapters / application.js中,但没有去:
export default DS.FixtureAdapter.extend();
使用ember-cli时如何设置使用灯具?
答案 0 :(得分:1)
您是否找到了问题的答案?如果不是:您导入了ember-data
吗?
// app/adapters/application.js
import DS from 'ember-data';
export default DS.FixtureAdapter.extend();
提示:如果您错过/评论import语句,ember-cli
(0.0.39)提供的JSHint测试之一将失败:
# See http://0.0.0.0:4200/tests
JSHint - <your-app>/adapters: <your-app>/adapters/application.js should pass jshint (1, 0, 1)
<your-app>/adapters/application.js should pass jshint. <your-app>/adapters/application.js: line 3, col 16, 'DS' is not defined.
问候!