Engine#resolverFor()

resolverFor (namespace) *private Defined in packages/ember-application/lib/system/engine.js:436 This function defines the default lookup rules for container lookups: templates are looked up on Ember.TEMPLATES other names are looked up on the application after classifying the name. For example, controller:post looks up App.PostController by default. if the default lookup fails, look for registered classes on the container This allows the application to register default injections in the con

Ember.getWithDefault()

getWithDefault (obj, keyName, defaultValue) Objectpublic Defined in packages/ember-metal/lib/property_get.js:106 Retrieves the value of a property from an Object, or a default value in the case that the property returns undefined. Ember.getWithDefault(person, 'lastName', 'Doe'); Parameters: obj Object The object to retrieve from. keyName String The name of the property to retrieve defaultValue Object The value to return if the property value is undefined Returns: Object

Binding Element Attributes

Binding Element Attributes In addition to normal text, you may also want to have your templates contain HTML elements whose attributes are bound to the controller. For example, imagine your controller has a property that contains a URL to an image: <div id="logo"> <img src={{logoUrl}} alt="Logo"> </div> This generates the following HTML: <div id="logo"> <img src="http://www.example.com/images/logo.png" alt="Logo"> </div> If you use data binding with a

DS.JSONAPISerializer#payloadTypeFromModelName()

payloadTypeFromModelName (modelname) Stringpublic Defined in addon/serializers/json-api.js:678 payloadTypeFromModelName can be used to change the mapping for the type in the payload, taken from the model name. Say your API namespaces the type of a model and expects the following payload when you update the post model: // POST /api/posts/1 { "data": { "id": 1, "type": "api::v1::post" } } By overwriting payloadTypeFromModelName you can specify that the namespaces model name for t

DS.JSONSerializer#normalizeUpdateRecordResponse()

normalizeUpdateRecordResponse (store, primaryModelClass, payload, id, requestType) Object Defined in addon/serializers/json.js:388 Available since 1.13.0 Parameters: store DS.Store primaryModelClass DS.Model payload Object id String|Number requestType String Returns: Object JSON-API Document

DS.JSONAPISerializer#keyForAttribute()

keyForAttribute (key, method) String Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:397 keyForAttribute can be used to define rules for how to convert an attribute name in your model to a key in your JSON. By default JSONAPISerializer follows the format used on the examples of http://jsonapi.org/format and uses dashes as the word separator in the JSON attribute keys. This behaviour can be easily customized by extending this method. Example app/serializers/

TextSupport#bubbles

bubblesBooleanprivate Defined in packages/ember-views/lib/mixins/text_support.js:172 Whether the keyUp event that triggers an action to be sent continues propagating to other views. By default, when the user presses the return key on their keyboard and the text field has an action set, the action will be sent to the view's controller and the key event will stop propagating. If you would like parent views to receive the keyUp event even after an action has been dispatched, set bubbles to tru

DS.Model.attributes

attributes{Ember.Map}static Defined in addon/-private/system/model/attr.js:18 A map whose keys are the attributes of the model (properties described by DS.attr) and whose values are the meta object for the property. Example app/models/person.js import DS from 'ember-data'; export default DS.Model.extend({ firstName: attr('string'), lastName: attr('string'), birthday: attr('date') }); import Ember from 'ember'; import Person from 'app/models/person'; var attributes = Ember.get(Perso

Ember.on()

on (eventNames, func) public Defined in packages/ember-metal/lib/events.js:280 Define a property as a function that should be executed when a specified event or events are triggered. let Job = Ember.Object.extend({ logCompleted: Ember.on('completed', function() { console.log('Job completed!'); }) }); let job = Job.create(); Ember.sendEvent(job, 'completed'); // Logs 'Job completed!' Parameters: eventNames String func Function Returns: func

ContainerProxyMixin#lookup()

lookup (fullName, options) Anypublic Defined in packages/ember-runtime/lib/mixins/container_proxy.js:49 Given a fullName return a corresponding instance. The default behaviour is for lookup to return a singleton instance. The singleton is scoped to the container, allowing multiple containers to all have their own locally scoped singletons. let registry = new Registry(); let container = registry.container(); registry.register('api:twitter', Twitter); let twitter = container.lookup('api:twi