MapWithDefault#copy()

copyEmber.MapWithDefaultprivate Inherited from Ember.Map but overwritten in packages/ember-metal/lib/map.js:468 Returns: Ember.MapWithDefault

Wrapping Content in a Component

Wrapping Content in a Component Sometimes, you may want to define a component that wraps content provided by other templates. For example, imagine we are building a blog-post component that we can use in our application to display a blog post: app/templates/components/blog-post.hbs <h1>{{title}}</h1> <div class="body">{{body}}</div> Now, we can use the {{blog-post}} component and pass it properties in another template: {{blog-post title=title body=body}} (See Passing

Function

Function Class Module: ember-runtime

Models

Introduction Models are objects that represent the underlying data that your application presents to the user. Different apps will have very different models, depending on what problems they're trying to solve. For example, a photo sharing application might have a Photo model to represent a particular photo, and a PhotoAlbum that represents a group of photos. In contrast, an online shopping app would probably have different models, like ShoppingCart, Invoice, or LineItem. Models tend to be pe

DS.Serializer

DS.Serializer Class Extends: Ember.Object Defined in: addon/serializer.js:7 Module: ember-data DS.Serializer is an abstract base class that you should override in your application to customize it for your backend. The minimum set of methods that you should implement is: normalizeResponse() serialize() And you can optionally override the following methods: normalize() For an example implementation, see DS.JSONSerializer, the included JSON serializer.

Ember.run.sync()

syncVoidprivate Defined in packages/ember-metal/lib/run_loop.js:288 Immediately flushes any events scheduled in the 'sync' queue. Bindings use this queue so this method is a useful way to immediately force all bindings in the application to sync. You should call this method anytime you need any changed state to propagate throughout the app immediately without repainting the UI (which happens in the later 'render' queue added by the ember-views package). run.sync(); Returns: Void

Ember.run.next()

next (target, method, args*) Objectpublic Defined in packages/ember-metal/lib/run_loop.js:425 Schedules an item to run from within a separate run loop, after control has been returned to the system. This is equivalent to calling run.later with a wait time of 1ms. run.next(myContext, function() { // code to be executed in the next run loop, // which will be scheduled after the current one }); Multiple operations scheduled with run.next will coalesce into the same later run loop, along w

TargetActionSupport

Ember.TargetActionSupport Class PRIVATE Extends: Ember.Mixin Defined in: packages/ember-runtime/lib/mixins/target_action_support.js:12 Module: ember-runtime Ember.TargetActionSupport is a mixin that can be included in a class to add a triggerAction method with semantics similar to the Handlebars {{action}} helper. In normal Ember usage, the {{action}} helper is usually the best choice. This mixin is most often useful when you are doing more complex event handling in View objects. See also

CoreObject

Ember.CoreObject Class PUBLIC Defined in: packages/ember-runtime/lib/system/core_object.js:204 Module: ember-runtime

DS.Errors#add()

add (attribute, messages) deprecated Defined in addon/-private/system/model/errors.js:209 Adds error messages to a given attribute and sends becameInvalid event to the record. Example: if (!user.get('username') { user.get('errors').add('username', 'This field is required'); } Parameters: attribute String messages (Array|String)