Test#triggerEvent()

triggerEvent (selector, context, type, options) RSVP.Promisepublic Defined in packages/ember-testing/lib/helpers/trigger_event.js:6 Available since 1.5.0 Triggers the given DOM event on the element identified by the provided selector. Example: javascript triggerEvent('#some-elem-id', 'blur'); This is actually used internally by the keyEvent helper like so: javascript triggerEvent('#some-elem-id', 'keypress', { keyCode: 13 }); Parameters: selector String jQuery selector for finding el

ViewTargetActionSupport#destroy()

destroyprivate Defined in packages/ember-views/lib/mixins/view_support.js:328 You must call destroy on a view to destroy the view (and all of its child views). This will remove the view from any parent node, then make sure that the DOM element managed by the view can be released by the memory manager.

Test#click()

click (selector, context) RSVP.Promisepublic Defined in packages/ember-testing/lib/helpers.js:44 Clicks an element and triggers any actions triggered by the element's click event. Example: click('.some-jQuery-selector').then(function() { // assert something }); Parameters: selector String jQuery selector for finding element on the DOM context Object A DOM Element, Document, or jQuery to use as context Returns: RSVP.Promise

HistoryLocation#getHash()

getHashprivate Defined in packages/ember-routing/lib/location/history_location.js:233

ViewTargetActionSupport#tagName

tagNameStringpublic Defined in packages/ember-views/lib/mixins/view_support.js:367 Tag name for the view's outer element. The tag name is only used when an element is first created. If you change the tagName for an element, you must destroy and recreate the view element. By default, the render buffer will use a <div> tag for views. Default: null

Computed Properties and Aggregate Data

Computed Properties and Aggregate Data Sometimes you have a computed property whose value depends on the properties of items in an array. For example, you may have an array of todo items, and want to calculate the incomplete todo's based on their isDone property. To facilitate this, Ember provides the @each key illustrated below: app/components/todo-list.js export default Ember.Component.extend({ todos: null, init() { this.set('todos', [ Ember.Object.create({ isDone: true }),

Instrumentation#reset()

resetprivate Defined in packages/ember-metal/lib/instrumentation.js:238 Resets Ember.Instrumentation by flushing list of subscribers.

Route#contextDidChange()

contextDidChangeprivate Defined in packages/ember-routing/lib/system/route.js:1395 Called when the context is changed by router.js.

Route#replaceWith()

replaceWith (name, models) Transitionpublic Defined in packages/ember-routing/lib/system/route.js:1093 Transition into another route while replacing the current URL, if possible. This will replace the current history entry instead of adding a new one. Beside that, it is identical to transitionTo in all other respects. See 'transitionTo' for additional information regarding multiple models. Example App.Router.map(function() { this.route('index'); this.route('secret'); }); App.SecretRout

Handlebars Basics

Handlebars Basics Ember uses the Handlebars templating library to power your app's user interface. Handlebars templates contain static HTML and dynamic content inside Handlebars expressions, which are invoked with double curly braces: {{}}. Dynamic content inside a Handlebars expression is rendered with data-binding. This means if you update a property, your usage of that property in a template will be automatically updated to the latest value. Displaying Properties Templates are backed with