resource Module
A Resource class to create JSON API resource objects. This is abstract, first
define a prototype using Resource.extend({ type: entity })
. Model prototypes
are registered in the container as factories, they use the options:
{ instantiate: false, singleton: false }
. So, to create a model instance
use the owner API method _lookupFactory('model:name')
† then create()
:
let model = Ember.getOwner(this)._lookupFactory('model:entity').create({ attributes: { key: value } });
† Note: eventually factoryFor
will replace _lookupFactory
This module provides the following classes: