DS.Model.relationships

relationshipsEmber.Mapstatic Defined in addon/-private/system/relationships/ext.js:325 The model's relationships as a map, keyed on the type of the relationship. The value of each entry is an array containing a descriptor for each relationship with that type, describing the name of the relationship as well as the type. For example, given the following model definition: app/models/blog.js import DS from 'ember-data'; export default DS.Model.extend({ users: DS.hasMany('user'), owner: DS.

Application#reset()

resetpublic Defined in packages/ember-application/lib/system/application.js:609 Reset the application. This is typically used only in tests. It cleans up the application in the following order: Deactivate existing routes Destroy all objects in the container Create a new application container Re-route to the existing url Typical Example: let App; run(function() { App = Ember.Application.create(); }); module('acceptance test', { setup: function() { App.reset(); } }); test('first

RegistryProxyMixin#unregister()

unregister (fullName) public Defined in packages/ember-runtime/lib/mixins/registry_proxy.js:90 Unregister a factory. let App = Ember.Application.create(); let User = Ember.Object.extend(); App.register('model:user', User); App.resolveRegistration('model:user').create() instanceof User //=> true App.unregister('model:user') App.resolveRegistration('model:user') === undefined //=> true Parameters: fullName String

ComputedProperty#volatile()

volatileEmber.ComputedPropertypublic Defined in packages/ember-metal/lib/computed.js:165 Call on a computed property to set it into non-cached mode. When in this mode the computed property will not automatically cache the return value. It also does not automatically fire any change events. You must manually notify any changes if you want to observe this property. Dependency keys have no effect on volatile properties as they are for cache invalidation and notification when cached value is in

Array#objectsAt()

objectsAt (indexes) Arraypublic Defined in packages/ember-runtime/lib/mixins/array.js:257 This returns the objects at the specified indexes, using objectAt. let arr = ['a', 'b', 'c', 'd']; arr.objectsAt([0, 1, 2]); // ['a', 'b', 'c'] arr.objectsAt([2, 3, 4]); // ['c', 'd', undefined] Parameters: indexes Array An array of indexes of items to return. Returns: Array

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

Bindings

Bindings Unlike most other frameworks that include some sort of binding implementation, bindings in Ember.js can be used with any object. That said, bindings are most often used within the Ember framework itself, and for most problems Ember app developers face, computed properties are the appropriate solution. The easiest way to create a two-way binding is to use a computed.alias(), that specifies the path to another object. husband = Ember.Object.create({ pets: 0 }); Wife = Ember.Object.e

Evented#trigger()

trigger (name, args) public Defined in packages/ember-runtime/lib/mixins/evented.js:104 Triggers a named event for the object. Any additional arguments will be passed as parameters to the functions that are subscribed to the event. person.on('didEat', function(food) { console.log('person ate some ' + food); }); person.trigger('didEat', 'broccoli'); // outputs: person ate some broccoli Parameters: name String The name of the event args Object... Optional arguments to pass on

EventDispatcher#rootElement

rootElementDOMElementprivate Defined in packages/ember-views/lib/system/event_dispatcher.js:94 The root DOM element to which event listeners should be attached. Event listeners will be attached to the document unless this is overridden. Can be specified as a DOMElement or a selector string. The default body is a string since this may be evaluated before document.body exists in the DOM. Default: 'body'

Test.QUnitAdapter

Ember.Test.QUnitAdapter Class PUBLIC Extends: Ember.Test.Adapter Defined in: packages/ember-testing/lib/adapters/qunit.js:4 Module: ember This class implements the methods defined by Ember.Test.Adapter for the QUnit testing framework.