Function#on()

onpublic Defined in packages/ember-runtime/lib/ext/function.js:162 The on extension of Javascript's Function prototype is available when EmberENV.EXTEND_PROTOTYPES or EmberENV.EXTEND_PROTOTYPES.Function is true, which is the default. You can listen for events simply by adding the on call to the end of your method declarations in classes or mixins that you write. For example: Ember.Mixin.create({ doSomethingWithElement: function() { // Executes whenever the "didInsertElement" event fir

Function#observes()

observespublic Defined in packages/ember-runtime/lib/ext/function.js:81 The observes extension of Javascript's Function prototype is available when EmberENV.EXTEND_PROTOTYPES or EmberENV.EXTEND_PROTOTYPES.Function is true, which is the default. You can observe property changes simply by adding the observes call to the end of your method declarations in classes that you write. For example: Ember.Object.extend({ valueObserver: function() { // Executes whenever the "value" property chang

Function#observesImmediately()

observesImmediatelydeprecatedprivate Defined in packages/ember-runtime/lib/ext/function.js:129 The observesImmediately extension of Javascript's Function prototype is available when EmberENV.EXTEND_PROTOTYPES or EmberENV.EXTEND_PROTOTYPES.Function is true, which is the default. You can observe property changes simply by adding the observesImmediately call to the end of your method declarations in classes that you write. For example: Ember.Object.extend({ valueObserver: function() { //

Feature Flags

Feature Flags New features are added to Ember.js within conditional statements. Code behind these flags can be conditionally enabled (or completely removed) based on your project's configuration. This allows newly developed features to be selectively released when the Ember.js community considers them ready for production use. Feature Life-Cycle A newly-flagged feature is only available in canary builds and can be enabled at runtime through your project's configuration file. At the start of a

Freezable

Ember.Freezable Class DEPRECATED PRIVATE Defined in: packages/ember-runtime/lib/mixins/freezable.js:11 Module: ember-runtime The Ember.Freezable mixin implements some basic methods for marking an object as frozen. Once an object is frozen it should be read only. No changes may be made the internal state of the object. Enforcement To fully support freezing in your subclass, you must include this mixin and override any method that might alter any property on the object to instead raise an ex

Finding Records

Finding Records The Ember Data store provides an interface for retrieving records of a single type. Retrieving a Single Record Use store.findRecord() to retrieve a record by its type and ID. This will return a promise that fulfills with the requested record: var blogPost = this.get('store').findRecord('blog-post', 1); // => GET /blog-posts/1 Use store.peekRecord() to retrieve a record by its type and ID, without making a network request. This will return the record only if it is already p

Freezable#freeze()

freezeObjectprivate Defined in packages/ember-runtime/lib/mixins/freezable.js:90 Freezes the object. Once this method has been called the object should no longer allow any properties to be edited. Returns: Object receiver

Freezable#isFrozen

isFrozenBooleanprivate Defined in packages/ember-runtime/lib/mixins/freezable.js:80 Set to true when the object is frozen. Use this property to detect whether your object is frozen or not.

Evented#has()

has (name) Booleanpublic Defined in packages/ember-runtime/lib/mixins/evented.js:142 Checks to see if object has any subscriptions for named event. Parameters: name String The name of the event Returns: Boolean does the object have a subscription for event

Evented#one()

one (name, target, method) public Defined in packages/ember-runtime/lib/mixins/evented.js:78 Subscribes a function to a named event and then cancels the subscription after the first time the event is triggered. It is good to use one when you only care about the first time an event has taken place. This function takes an optional 2nd argument that will become the "this" value for the callback. If this argument is passed then the 3rd argument becomes the function. Parameters: name String