Ember.copy()

copy (obj, deep) Objectpublic Defined in packages/ember-runtime/lib/copy.js:66 Creates a shallow copy of the passed object. A deep copy of the object is returned if the optional deep argument is true. If the passed object implements the Ember.Copyable interface, then this function will delegate to the object's copy() method and return the result. See Ember.Copyable for further details. For primitive values (which are immutable in JavaScript), the passed object is simply returned. Paramete

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#currentURL()

currentURLObjectpublic Defined in packages/ember-testing/lib/helpers.js:187 Available since 1.5.0 Returns the current URL. Example: function validateURL() { equal(currentURL(), '/some/path', "correct URL was transitioned into."); } click('#some-link-id').then(validateURL); Returns: Object The currently active URL.

Ember.inject.service()

service (name) Ember.InjectedPropertypublic Defined in packages/ember-runtime/lib/system/service.js:5 Available since 1.10.0 Creates a property that lazily looks up a service in the container. There are no restrictions as to what objects a service can be injected into. Example: App.ApplicationRoute = Ember.Route.extend({ authManager: Ember.inject.service('auth'), model: function() { return this.get('authManager').findCurrentUser(); } }); This example will create an authManager p

Registry#normalize()

normalize (fullName) Stringprivate Defined in packages/container/lib/registry.js:303 Normalize a fullName based on the application's conventions Parameters: fullName String Returns: String normalized fullName

DS.BooleanTransform

DS.BooleanTransform Class Extends: DS.Transform Defined in: addon/-private/transforms/boolean.js:7 Module: ember-data The DS.BooleanTransform class is used to serialize and deserialize boolean attributes on Ember Data record objects. This transform is used when boolean is passed as the type parameter to the DS.attr function. Usage app/models/user.js import DS from 'ember-data'; export default DS.Model.extend({ isAdmin: DS.attr('boolean'), name: DS.attr('string'), email: DS.attr('str

Ember.removeListener()

removeListener (obj, eventName, target, method) public Defined in packages/ember-metal/lib/events.js:112 Remove an event listener Arguments should match those passed to Ember.addListener. Parameters: obj eventName String target Object|Function A target object or a function method Function|String A function or the name of a function to be called on `target`

DS#attr()

attr (type, options) Attribute Defined in addon/attr.js:38 DS.attr defines an attribute on a DS.Model. By default, attributes are passed through as-is, however you can specify an optional type to have the value automatically transformed. Ember Data ships with four basic transform types: string, number, boolean and date. You can define your own transforms by subclassing DS.Transform. Note that you cannot use attr to define an attribute of id. DS.attr takes an optional hash as a second parame

Built-in Helpers

Built-in Helpers Built-in Helpers In the last section you learned how to write a helper. A helper is usually a simple function that can be used in any template. Ember comes with a few helpers that can make developing your templates a bit easier. These helpers can allow you to be more dynamic in passing data to another helper or component. Using a helper to get a property dynamically The {{get}} helper makes it easy to dynamically send the value of a variable to another helper or component. Th

Test#registerWaiter()

registerWaiter (context, callback) public Defined in packages/ember-testing/lib/test/waiters.js:7 Available since 1.2.0 This allows ember-testing to play nicely with other asynchronous events, such as an application that is waiting for a CSS3 transition or an IndexDB transaction. For example: Ember.Test.registerWaiter(function() { return myPendingTransactions() == 0; }); The context argument allows you to optionally specify the this with which your callback will be invoked. For example: