Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ember Model vs Content?

Tags:

model

ember.js

What are the main differences between the ember model and content?

As far as I can tell, the model is basically the wrapper which contains all the content for the model kind, in addition, it has store related info such as defined fixtures and store state. The content on the other hand, only stores the data with no knowledge of what is or whether it has been saved/delete/loaded. Are there any bigger differences to note between the two?

like image 599
JJJ Avatar asked Sep 20 '26 10:09

JJJ


1 Answers

Are you asking about the content versus model properties on controllers? They represent the same object. From the Ember.ControllerMixin:

Ember.ControllerMixin = Ember.Mixin.create(Ember.ActionHandler, {
    ....
    model: Ember.computed.alias('content')
like image 86
buuda Avatar answered Sep 25 '26 05:09

buuda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!