Instrumentation

Ember.Instrumentation Namespace PRIVATE Defined in: packages/ember-metal/lib/instrumentation.js:4 Module: ember The purpose of the Ember Instrumentation module is to provide efficient, general-purpose instrumentation for Ember. Subscribe to a listener by using Ember.subscribe: Ember.subscribe("render", { before(name, timestamp, payload) { }, after(name, timestamp, payload) { } }); If you return a value from the before callback, that same value will be passed as a fourth paramet

RSVP.all()

all (array, label) static Inherited from RSVP but overwritten in bower_components/rsvp/lib/rsvp/all.js:3 This is a convenient alias for RSVP.Promise.all. Parameters: array Array Array of promises. label String An optional label. This is useful for tooling.

Inflector

Ember.Inflector Class Defined in: node_modules/ember-inflector/addon/lib/system/inflector.js:32 Module: ember-data Inflector.Ember provides a mechanism for supplying inflection rules for your application. Ember includes a default set of inflection rules, and provides an API for providing additional rules. Examples: Creating an inflector with no rules. var inflector = new Ember.Inflector(); Creating an inflector with the default ember ruleset. var inflector = new Ember.Inflector(Ember.Infl

Ember.computed.setDiff()

setDiff (setAProperty, setBProperty) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/reduce_computed_macros.js:493 A computed property which returns a new array with all the properties from the first dependent array that are not in the second dependent array. Example let Hamster = Ember.Object.extend({ likes: ['banana', 'grape', 'kale'], wants: Ember.computed.setDiff('likes', 'fruits') }); let hamster = Hamster.create({ fruits: [ 'grape', 'kale',

DataAdapter#watchModelTypes()

watchModelTypes (typesAdded, typesUpdated) Functionpublic Defined in packages/ember-extension-support/lib/data_adapter.js:129 Fetch the model types and observe them for changes. Parameters: typesAdded Function Callback to call to add types. Takes an array of objects containing wrapped types (returned from `wrapModelType`). typesUpdated Function Callback to call when a type has changed. Takes an array of objects containing wrapped types. Returns: Function Method to call to rem

DS.Model#rollbackAttributes()

rollbackAttributes Defined in addon/-private/system/model/model.js:671 Available since 1.13.0 If the model hasDirtyAttributes this function will discard any unsaved changes. If the model isNew it will be removed from the store. Example record.get('name'); // 'Untitled Document' record.set('name', 'Doc 1'); record.get('name'); // 'Doc 1' record.rollbackAttributes(); record.get('name'); // 'Untitled Document'

DataAdapter#wrapModelType()

wrapModelType (klass, modelName) Objectprivate Defined in packages/ember-extension-support/lib/data_adapter.js:311 Wraps a given model type and observes changes to it. Parameters: klass Class A model class. modelName String Name of the class. Returns: Object Contains the wrapped type and the function to remove observers Format: type: {Object} The wrapped type. The wrapped type has the following format: name: {String} The name of the type. count: {Integer} The number of record

ArrayProxy#contentArrayDidChange()

contentArrayDidChange (contentArray, start, removeCount, addCount) private Defined in packages/ember-runtime/lib/system/array_proxy.js:167 Override to implement content array didChange observer. Parameters: contentArray Ember.Array the content array start Number starting index of the change removeCount Number count of items removed addCount Number count of items added

DS.JSONAPISerializer#keyForRelationship()

keyForRelationship (key, typeClass, method) String Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:427 keyForRelationship can be used to define a custom key when serializing and deserializing relationship properties. By default JSONAPISerializer follows the format used on the examples of http://jsonapi.org/format and uses dashes as word separators in relationship properties. This behaviour can be easily customized by extending this method. Example app/seria

OrderedSet#add()

add (obj, guid) Ember.OrderedSetprivate Defined in packages/ember-metal/lib/map.js:99 Parameters: obj guid (optional, and for internal use) Returns: Ember.OrderedSet