HTMLBars.helpers.singularize()

singularize (word) Defined in node_modules/ember-inflector/addon/lib/helpers/singularize.js:4 If you have Ember Inflector (such as if Ember Data is present), singularize a word. For example, turn "oxen" into "ox". Example: {{singularize myProperty}} {{singularize "oxen"}} Parameters: word String|Property word to singularize

Component#willRender()

willRenderpublic Defined in packages/ember-htmlbars/lib/component.js:394 Available since 1.13.0 Called before a component has been rendered, both on initial render and in subsequent rerenders.

DataAdapter#getRecordColumnValues()

getRecordColumnValuesObjectprivate Defined in packages/ember-extension-support/lib/data_adapter.js:435 Gets the values for each column. Returns: Object Keys should match column names defined by the model type.

DS.RecordArray#removeInternalModel()

removeInternalModel (internalModel) private Defined in addon/-private/system/record-arrays/record-array.js:159 Removes an internalModel to the RecordArray. Parameters: internalModel InternalModel

Embedding Applications

Embedding Applications In most cases, your application's entire UI will be created by templates that are managed by the router. But what if you have an Ember.js app that you need to embed into an existing page, or run alongside other JavaScript frameworks, or serve from the same domain as another app? Changing the Root Element By default, your application will render the application template and attach it to the document's body element. You can tell the application to append the application t

Relationships

Relationships Ember Data includes several built-in relationship types to help you define how your models relate to each other. One-to-One To declare a one-to-one relationship between two models, use DS.belongsTo: app/models/user.js import DS from 'ember-data'; export default DS.Model.extend({ profile: DS.belongsTo('profile') }); app/models/profile.js import DS from 'ember-data'; export default DS.Model.extend({ user: DS.belongsTo('user') }); One-to-Many To declare a one-to-many relati

DS.JSONAPISerializer#payloadTypeFromModelName()

payloadTypeFromModelName (modelname) Stringpublic Defined in addon/serializers/json-api.js:678 payloadTypeFromModelName can be used to change the mapping for the type in the payload, taken from the model name. Say your API namespaces the type of a model and expects the following payload when you update the post model: // POST /api/posts/1 { "data": { "id": 1, "type": "api::v1::post" } } By overwriting payloadTypeFromModelName you can specify that the namespaces model name for t

DS.ManyArray#save()

saveDS.PromiseArray Defined in addon/-private/system/many-array.js:244 Saves all of the records in the ManyArray. Example store.findRecord('inbox', 1).then(function(inbox) { inbox.get('messages').then(function(messages) { messages.forEach(function(message) { message.set('isRead', true); }); messages.save() }); }); Returns: DS.PromiseArray promise

DS.BuildURLMixin#_buildURL()

_buildURL (modelName, id) Stringprivate Defined in addon/-private/adapters/build-url-mixin.js:81 Parameters: modelName String id String Returns: String url

ArrayProxy

Ember.ArrayProxy Class PUBLIC Extends: Ember.Object Uses: Ember.MutableArray Defined in: packages/ember-runtime/lib/system/array_proxy.js:37 Module: ember-runtime An ArrayProxy wraps any other object that implements Ember.Array and/or Ember.MutableArray, forwarding all requests. This makes it very useful for a number of binding use cases or other cases where being able to swap out the underlying array is useful. A simple example of usage: let pets = ['dog', 'cat', 'fish']; let ap = Ember.A