O'Reilly logo

Instant Ember.js Application Development How-to by Marc Bodmer

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

Enhancing an Ember object (Simple)

Now that we have our basic Ember objects, we can begin to make them more powerful. The Ember.js documentation promotes three features. Two of these features deal with models. One of them is auto-updating templates and the other two are bindings and computed properties. In this recipe, we are only concerned with bindings and computed properties.

How to do it...

Now that we have some basic Ember objects defined in our application, we can go ahead and add more advanced functionality to them.

  1. We can represent actors in our application using bindings, so create a new file in the models folder called actor.js and paste the following code:
    MovieTracker.Actor = Ember.Object.extend({ filmBinding: 'MovieTracker.Movie.title' ...

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