Ember.GUID_PREFIX

GUID_PREFIXStringprivateconstant Defined in packages/ember-metal/lib/utils.js:30 Prefix used for guids through out Ember.

TextField#type

typeStringpublic Defined in packages/ember-htmlbars/lib/components/text_field.js:100 The type attribute of the input element. Default: "text"

Ember.VERSION

VERSIONStringpublic Defined in packages/ember-metal/lib/index.js:308 The semantic version

Ember.A()

AEmber.NativeArraypublic Defined in packages/ember-runtime/lib/system/native_array.js:108 Creates an Ember.NativeArray from an Array like object. Does not modify the original object. Ember.A is not needed if EmberENV.EXTEND_PROTOTYPES is true (the default value). However, it is recommended that you use Ember.A when creating addons for ember or when you can not guarantee that EmberENV.EXTEND_PROTOTYPES will be true. Example export default Ember.Component.extend({ tagName: 'ul', className

Testing Routes

Testing Routes Unit testing methods and computed properties follows previous patterns shown in Unit Testing Basics because Ember.Route extends Ember.Object. Testing routes can be done both via acceptance or unit tests. Acceptance tests will likely provide better coverage for routes because routes are typically used to perform transitions and load data, both of which are tested more easily in full context rather than isolation. That being said, sometimes it is important to unit test your route

Feature Flags

Feature Flags New features are added to Ember.js within conditional statements. Code behind these flags can be conditionally enabled (or completely removed) based on your project's configuration. This allows newly developed features to be selectively released when the Ember.js community considers them ready for production use. Feature Life-Cycle A newly-flagged feature is only available in canary builds and can be enabled at runtime through your project's configuration file. At the start of a

DS.Ember.HTMLBars.helpers

DS.Ember.HTMLBars.helpers Class Module: ember-data

Ember.watch()

watch (obj, _keyPath) private Defined in packages/ember-metal/lib/watching.js:24 Starts watching a property on an object. Whenever the property changes, invokes Ember.propertyWillChange and Ember.propertyDidChange. This is the primitive used by observers and dependent keys; usually you will never call this method directly but instead use higher level methods like Ember.addObserver() Parameters: obj _keyPath String

Handling Events

Handling Events You can respond to user events on your component like double-clicking, hovering, and key presses through event handlers. Simply implement the name of the event you want to respond to as a method on your component. For example, imagine we have a template like this: {{#double-clickable}} This is a double clickable area! {{/double-clickable}} Let's implement double-clickable such that when it is clicked, an alert is displayed: app/components/double-clickable.js import Ember fr

Ember.computed.map()

map (dependentKey, callback) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/reduce_computed_macros.js:168 Returns an array mapped via the callback The callback method you provide should have the following signature. item is the current item in the iteration. index is the integer index of the current item in the iteration. function(item, index); Example let Hamster = Ember.Object.extend({ excitingChores: Ember.computed.map('chores', function(chore, index) {