Chapter 2. The Ember.Object Model

In this chapter, we will cover the following recipes:

  • Working with classes and instances
  • Working with computed properties
  • Working with Ember observers in Ember.js
  • Working with bindings
  • Using mixins
  • Using enumerables with arrays

Introduction

Ember.Object is the base class for almost every other Ember object. Routes, models, views, and components all inherit from Ember.Object. It's used everywhere so it's important to understand how it works and how it can be used in our application.

Standard JavaScript objects aren't used often in Ember. Ember's object model builds on JavaScript objects and adds important features such as observers, mixins, computed properties, and initializers. Many of these features are aligned to be ...

Get Ember.js Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.