In my opinion, Ember CLI is the best “feature” of ember and you can use it to generate all sort of things. Here is how to generate models for your app.
1 |
<em>ember generate model Article title:string priority:number content:string status:string publishedAt:date</em> |
or for short use ‘g’ instead of ‘generate’ i.e.
1 |
ember g model Article title:string priority:number content:string status:string publishedAt:date |
The above command will generate the following model
Bonus
If you make a mistake while generating, you can undo it with a “destroy”. For example, to undo the above generation, you would call
1 |
ember d model Article |
d = destroy