CoreObject.eachComputedProperty()

eachComputedProperty (callback, binding) privatestatic Defined in packages/ember-runtime/lib/system/core_object.js:853 Iterate over each computed property for the class, passing its name and any associated metadata (see metaForProperty) to the callback. Parameters: callback Function binding Object

Transition#then()

then (onFulfilled, onRejected, label) Promisepublic Defined in bower_components/router.js/lib/router/transition.js:135 A standard promise hook that resolves if the transition succeeds and rejects if it fails/redirects/aborts. Forwards to the internal promise property which you can use in situations where you want to pass around a thennable, but not the Transition itself. Parameters: onFulfilled Function onRejected Function label String optional string for labeling the promise. Us

DS.Adapter#shouldReloadAll()

shouldReloadAll (store, snapshotRecordArray) Boolean Defined in addon/adapter.js:527 Available since 1.13.0 This method is used by the store to determine if the store should reload all records from the adapter when records are requested by store.findAll. If this method returns true, the store will re-fetch all records from the adapter. If this method returns false, the store will resolve immediately using the cached records. For example, if you are building an events ticketing system, in wh

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

HistoryLocation

Ember.HistoryLocation Class PRIVATE Extends: Ember.Object Defined in: packages/ember-routing/lib/location/history_location.js:16 Module: ember-routing Ember.HistoryLocation implements the location API using the browser's history.pushState API.

RSVP.Promise#catch()

catch (onRejection, label) Promise Defined in bower_components/rsvp/lib/rsvp/promise.js:410 catch is simply sugar for then(undefined, onRejection) which makes it the same as the catch block of a try/catch statement. function findAuthor(){ throw new Error('couldn't find that author'); } // synchronous try { findAuthor(); } catch(reason) { // something went wrong } // async with promises findAuthor().catch(function(reason){ // something went wrong }); Parameters: onRejection Fun

DS.BuildURLMixin

DS.BuildURLMixin Class Defined in: addon/-private/adapters/build-url-mixin.js:5 Module: ember-data WARNING: This interface is likely to change in order to accomodate https://github.com/emberjs/rfcs/pull/4 Using BuildURLMixin To use url building, include the mixin when extending an adapter, and call buildURL where needed. The default behaviour is designed for RESTAdapter. Example export default DS.Adapter.extend(BuildURLMixin, { findRecord: function(store, type, id, snapshot) {

Defining Your Routes

Defining Your Routes When your application starts, the router matches the current URL to the routes that you've defined. The routes, in turn, are responsible for displaying templates, loading data, and setting up application state. To define a route, run ember generate route route-name This creates a route file at app/routes/route-name.js, a template for the route at app/templates/route-name.hbs, and a unit test file at tests/unit/routes/route-name-test.js. It also adds the route to the rout

Array#indexOf()

indexOf (object, startAt) Numberpublic Defined in packages/ember-runtime/lib/mixins/array.js:370 Returns the index of the given object's first occurrence. If no startAt argument is given, the starting location to search is 0. If it's negative, will count backward from the end of the array. Returns -1 if no match is found. let arr = ['a', 'b', 'c', 'd', 'a']; arr.indexOf('a'); // 0 arr.indexOf('z'); // -1 arr.indexOf('a', 2); // 4 arr.indexOf('a', -1); // 4 arr.indexOf('

DS.JSONSerializer#transformFor()

transformFor (attributeType, skipAssertion) DS.Transformprivate Defined in addon/serializers/json.js:1500 Parameters: attributeType String skipAssertion Boolean Returns: DS.Transform transform