O'Reilly logo

Ember.js Web Development with Ember CLI by Suchit Puri

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Observers in Ember.js

Observers in Ember.js are methods that observe one or more object properties and are called when these properties change.

At first, they may seem similar to computed properties, but in reality they are completely different from them. One very big difference being that computed properties are functions which behave like normal properties that can be accessed via, get and set methods, and can be used in templates like any other property.

Observers on other hand are like listeners in JavaScript. They observe properties, and get called when these properties changes. They cannot be accessed like properties neither can they be used in templates. Let us see an example of observer chapter-2/example8:

import Ember from 'ember'; export ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required