Enumerable#forEach()

forEach (callback, target) Objectpublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:249 Iterates through the enumerable, calling the passed function on each item. This method corresponds to the forEach() method defined in JavaScript 1.6. The callback method you provide should have the following signature (all parameters are optional): function(item, index, enumerable); item is the current item in the iteration. index is the current index in the iteration. enumerable is th

DS.Model#isLoaded

isLoaded{Boolean} Defined in addon/-private/system/model/model.js:79 If this property is true the record is in the loaded state. A record enters this state when its data is populated. Most of a record's lifecycle is spent inside substates of the loaded state. Example var record = store.createRecord('model'); record.get('isLoaded'); // true store.findRecord('model', 1).then(function(model) { model.get('isLoaded'); // true });

DS.JSONAPISerializer#normalize()

normalize (modelClass, resourceHash) Object Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:370 Parameters: modelClass DS.Model resourceHash Object the resource hash from the adapter Returns: Object the normalized resource hash

Ember.typeOf()

typeOf (item) Stringpublic Defined in packages/ember-runtime/lib/utils.js:55 Returns a consistent type for the passed object. Use this instead of the built-in typeof to get the type of an item. It will return the same result across all browsers and includes a bit more detail. Here is what will be returned: | Return Value | Meaning | |---------------|------------------------------------------------------| | 'string' | String primitive or Str

MutableArray#unshiftObject()

unshiftObject (obj) public Defined in packages/ember-runtime/lib/mixins/mutable_array.js:259 Unshift an object to start of array. Works just like unshift() but it is KVO-compliant. let colors = ['red']; colors.unshiftObject('yellow'); // ['yellow', 'red'] colors.unshiftObject(['black']); // [['black'], 'yellow', 'red'] Parameters: obj * object to unshift Returns: object same object passed as a param

DS.Adapter#deleteRecord()

deleteRecord (store, type, snapshot) Promise Defined in addon/adapter.js:371 Implement this method in a subclass to handle the deletion of a record. Sends a delete request for the record to the server. Example app/adapters/application.js import DS from 'ember-data'; export default DS.Adapter.extend({ deleteRecord: function(store, type, snapshot) { var data = this.serialize(snapshot, { includeId: true }); var id = snapshot.id; return new Ember.RSVP.Promise(function(resolve, r

EventDispatcher#events

eventsObjectprivate Defined in packages/ember-views/lib/system/event_dispatcher.js:35 The set of events names (and associated handler function names) to be setup and dispatched by the EventDispatcher. Modifications to this list can be done at setup time, generally via the Ember.Application.customEvents hash. To add new events to be listened to: let App = Ember.Application.create({ customEvents: { paste: 'paste' } }); To prevent default events from being listened to: let App = Ember

DS.BuildURLMixin#pathForType()

pathForType (modelName) String Defined in addon/-private/adapters/build-url-mixin.js:410 Determines the pathname for a given type. By default, it pluralizes the type's name (for example, 'post' becomes 'posts' and 'person' becomes 'people'). Pathname customization For example if you have an object LineItem with an endpoint of "/line_items/". app/adapters/application.js import DS from 'ember-data'; export default DS.RESTAdapter.extend({ pathForType: function(modelName) { var decameliz

DS.Store#didUpdateAll()

didUpdateAll (typeClass) private Defined in addon/-private/system/store.js:1462 Parameters: typeClass DS.Model

DS.Model#_debugInfo()

_debugInfoprivate Defined in addon/-private/system/debug/debug-info.js:5 Provides info about the model for debugging purposes by grouping the properties into more semantic groups. Meant to be used by debugging tools such as the Chrome Ember Extension. Groups all attributes in "Attributes" group. Groups all belongsTo relationships in "Belongs To" group. Groups all hasMany relationships in "Has Many" group. Groups all flags in "Flags" group. Flags relationship CPs as expensive properties.