Ember.on()

on (eventNames, func) public Defined in packages/ember-metal/lib/events.js:280 Define a property as a function that should be executed when a specified event or events are triggered. let Job = Ember.Object.extend({ logCompleted: Ember.on('completed', function() { console.log('Job completed!'); }) }); let job = Job.create(); Ember.sendEvent(job, 'completed'); // Logs 'Job completed!' Parameters: eventNames String func Function Returns: func

Ember.observer()

observer (propertyNames, func) public Defined in packages/ember-metal/lib/mixin.js:703 Specify a method that observes property changes. Ember.Object.extend({ valueObserver: Ember.observer('value', function() { // Executes whenever the "value" property changes }) }); Also available as Function.prototype.observes if prototype extensions are enabled. Parameters: propertyNames String func Function Returns: func

Ember.mixin()

mixin (obj, mixins) private Defined in packages/ember-metal/lib/mixin.js:386 Parameters: obj mixins Returns: obj

Ember.meta()

meta (obj, writable) Objectprivate Defined in packages/ember-metal/lib/meta.js:360 Retrieves the meta hash for an object. If writable is true ensures the hash is writable for this object as well. The meta object contains information about computed property descriptors as well as any watched properties and other information. You generally will not access this information directly but instead work with higher level methods that manipulate this hash indirectly. Parameters: obj Object The

Ember.merge()

merge (original, updates) Objectpublic Defined in packages/ember-metal/lib/merge.js:1 Merge the contents of two objects together into the first object. Ember.merge({ first: 'Tom' }, { last: 'Dale' }); // { first: 'Tom', last: 'Dale' } var a = { first: 'Yehuda' }; var b = { last: 'Katz' }; Ember.merge(a, b); // a == { first: 'Yehuda', last: 'Katz' }, b == { last: 'Katz' } Parameters: original Object The object to merge into updates Object The object to copy properties from Retur

Ember.makeArray()

makeArray (obj) Arrayprivate Defined in packages/ember-metal/lib/utils.js:370 Forces the passed object to be part of an array. If the object is already an array, it will return the object. Otherwise, it will add the object to an array. If obj is null or undefined, it will return an empty array. Ember.makeArray(); // [] Ember.makeArray(null); // [] Ember.makeArray(undefined); // [] Ember.makeArray('lindsay'); // ['lindsay'] Ember.makeArray([1, 2, 42]); // [1, 2, 42] l

Ember.listenersFor()

listenersFor (obj, eventName) private Defined in packages/ember-metal/lib/events.js:257 Parameters: obj eventName String

Ember.K()

KObjectpublic Defined in packages/ember-metal/lib/index.js:407 An empty function useful for some operations. Always returns this. Returns: Object

Ember.isPresent()

isPresent (obj) Booleanpublic Defined in packages/ember-metal/lib/is_present.js:3 Available since 1.8.0 A value is present if it not isBlank. Ember.isPresent(); // false Ember.isPresent(null); // false Ember.isPresent(undefined); // false Ember.isPresent(''); // false Ember.isPresent(' '); // false Ember.isPresent('\n\t'); // false Ember.isPresent([]); // false Ember.isPresent({ length: 0 }) // false Ember.isP

Ember.isNone()

isNone (obj) Booleanpublic Defined in packages/ember-metal/lib/is_none.js:1 Returns true if the passed value is null or undefined. This avoids errors from JSLint complaining about use of ==, which can be technically confusing. Ember.isNone(); // true Ember.isNone(null); // true Ember.isNone(undefined); // true Ember.isNone(''); // false Ember.isNone([]); // false Ember.isNone(function() {}); // false Parameters: obj Object Value to test