Displaying the Keys in an Object

Displaying the Keys in an Object If you need to display all of the keys or values of a JavaScript object in your template, you can use the {{#each-in}} helper: /app/components/store-categories.js import Ember from 'ember'; export default Ember.Component.extend({ willRender() { // Set the "categories" property to a JavaScript object // with the category name as the key and the value a list // of products. this.set('categories', { 'Bourbons': ['Bulleit', 'Four Roses', '

Enumerable#uniqBy()

uniqByEmber.Enumerablepublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:1082 Returns a new enumerable that contains only items containing a unique property value. The default implementation returns an array regardless of the receiver type. let arr = [{ value: 'a' }, { value: 'a' }, { value: 'b' }, { value: 'b' }]; arr.uniqBy('value'); // [{ value: 'a' }, { value: 'b' }] Returns: Ember.Enumerable

RegistryProxyMixin#registeredOptionsForType()

registeredOptionsForType (type) Objectpublic Defined in packages/ember-runtime/lib/mixins/registry_proxy.js:193 Return the registered options for all factories of a type. Parameters: type String Returns: Object options

DS.Model#adapterDidDirty()

adapterDidDirtyprivate Defined in addon/-private/system/model/model.js:655

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

Registry#_options

_optionsInheritingDictprivate Defined in packages/container/lib/registry.js:123

Enumerable#sortBy()

sortBy (property) Arraypublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:1047 Available since 1.2.0 Converts the enumerable into an array and sorts by the keys specified in the argument. You may provide multiple arguments to sort by multiple properties. Parameters: property String name(s) to sort on Returns: Array The sorted array.

Route#enter()

enterprivate Defined in packages/ember-routing/lib/system/route.js:493

Query Parameters

Query Parameters Query parameters are optional key-value pairs that appear to the right of the ? in a URL. For example, the following URL has two query params, sort and page, with respective values ASC and 2: http://example.com/articles?sort=ASC&page=2 Query params allow for additional application state to be serialized into the URL that can't otherwise fit into the path of the URL (i.e. everything to the left of the ?). Common use cases for query params include representing the current

DS.Store#adapterFor()

adapterFor (modelName) public Defined in addon/-private/system/store.js:2369 Returns an instance of the adapter for a given type. For example, adapterFor('person') will return an instance of App.PersonAdapter. If no App.PersonAdapter is found, this method will look for an App.ApplicationAdapter (the default adapter for your entire application). If no App.ApplicationAdapter is found, it will return the value of the defaultAdapter. Parameters: modelName String Returns: DS.Adapter