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

Common parts of an application (Medium)

Now that we have talked about most of the basics of Ember, we can start to create some basic elements of an application.

How to do it...

As seen earlier, Ember allows us to make a function act like a property when we add .property(). Any parameters of this function will let Ember know that it has to update the value of the property when the specific parameters are updated.

  1. In our moviesController, we are storing all the movie objects that exist in our application. We can add some helper properties to this controller.
    // Controller to store Movie Objects MovieTracker.moviesController = Ember.ArrayController.create({ content: [], // Property that adds an item to the array addItem: function(item) { this.addObject(item); ...

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