Helper.helper()

helper (helper) publicstatic Defined in packages/ember-htmlbars/lib/helper.js:109 Available since 1.13.0 In many cases, the ceremony of a full Ember.Helper class is not required. The helper method creates pure-function helpers without instances. For example: // app/helpers/format-currency.js export function formatCurrency([cents], hash) { let currency = hash.currency; return `${currency}${cents * 0.01}`; }); export default Ember.Helper.helper(formatCurrency); // tests/myhelper.js impo

DS.StringTransform

DS.StringTransform Class Extends: DS.Transform Defined in: addon/-private/transforms/string.js:6 Module: ember-data The DS.StringTransform class is used to serialize and deserialize string attributes on Ember Data record objects. This transform is used when string 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('string')

Route#model()

model (params, transition) Object|Promisepublic Defined in packages/ember-routing/lib/system/route.js:1405 A hook you can implement to convert the URL into the model for this route. App.Router.map(function() { this.route('post', { path: '/posts/:post_id' }); }); The model for the post route is store.findRecord('post', params.post_id). By default, if your route has a dynamic segment ending in _id: The model class is determined from the segment (post_id's class is App.Post) The find method

DS.JSONAPISerializer

DS.JSONAPISerializer Class Extends: DS.JSONSerializer Defined in: addon/serializers/json-api.js:14 Module: ember-data Ember Data 2.0 Serializer: In Ember Data a Serializer is used to serialize and deserialize records when they are transferred in and out of an external source. This process involves normalizing property names, transforming attribute values and serializing relationships. JSONAPISerializer supports the http://jsonapi.org/ spec and is the serializer recommended by Ember Data. T

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.

DS.FilteredRecordArray#filterFunction()

filterFunction (record) Boolean Defined in addon/-private/system/record-arrays/filtered-record-array.js:21 The filterFunction is a function used to test records from the store to determine if they should be part of the record array. Example var allPeople = store.peekAll('person'); allPeople.mapBy('name'); // ["Tom Dale", "Yehuda Katz", "Trek Glowacki"] var people = store.filter('person', function(person) { if (person.get('name').match(/Katz$/)) { return true; } }); people.mapBy('name');

DS.AdapterPopulatedRecordArray

DS.AdapterPopulatedRecordArray Class Extends: DS.RecordArray Defined in: addon/-private/system/record-arrays/adapter-populated-record-array.js:12 Module: ember-data Represents an ordered list of records whose order and membership is determined by the adapter. For example, a query sent to the adapter may trigger a search on the server, whose results would be loaded into an instance of the AdapterPopulatedRecordArray. If you want to update the array and get the latest records from the adapt

DS.JSONSerializer#primaryKey

primaryKey{String} Defined in addon/serializers/json.js:87 The primaryKey is used when serializing and deserializing data. Ember Data always uses the id property to store the id of the record. The external source may not always follow this convention. In these cases it is useful to override the primaryKey property to match the primaryKey of your external store. Example app/serializers/application.js import DS from 'ember-data'; export default DS.JSONSerializer.extend({ primaryKey: '_id'

DS.Model.typeForRelationship()

typeForRelationship (name, store) DS.Modelstatic Defined in addon/-private/system/relationships/ext.js:161 For a given relationship name, returns the model type of the relationship. For example, if you define a model like this: app/models/post.js import DS from 'ember-data'; export default DS.Model.extend({ comments: DS.hasMany('comment') }); Calling App.Post.typeForRelationship('comments') will return App.Comment. Parameters: name String the name of the relationship store Store

Transition#catch()

catch (onRejection, label) Promisepublic Defined in bower_components/router.js/lib/router/transition.js:155 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: onRejection Function label String optional string for labeling the promise. Useful for tooling. Returns: Promise