ember-cli (2.4.3) not generating DS models

£可爱£侵袭症+ 提交于 2019-12-02 05:48:52

There is nothing wrong with the generated code :)

Ember Data has been made an addon, and part of that work was to tweak the public ES6 modules so everything doesn't hang off of the DS object. Now you can directly import the Model like in the first code sample you show.

I have opened an issue on the Guides repository to fix the Tutorial section of the guides.

The new generated code should look like the following,

import Model from 'ember-data/model';
import attr from 'ember-data/attr' ;


export default Model.extend({
    title: attr('string'),
    owner: attr('string')
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!