Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 ember-app-kit 将默认适配器设置为 ember-data RESTAdapter?文档对此不是很清楚。谢谢!
该ember-app-kit/app/adapters/application.js文件是您定义应用程序适配器的地方。
ember-app-kit/app/adapters/application.js
只需将其内容更改为:
export default DS.RESTAdapter;
它将使用 RESTAdapter。
如果要覆盖某些属性,可以执行以下操作:
var MyRESTAdapter = DS.RESTAdapter.extend({ host: 'https://api.example.com' }); export default MyRESTAdapter;