O'Reilly logo

Mastering Ember.js by Mitchel Kelonye

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

Rendering dynamic data from controllers

After loading data from the server, the controller's purpose is to make this model available to the corresponding template for display. These templates will then register bindings to the properties of the provided model and send updates of changes made to these properties using form controls. Since controllers are an extension of Ember.Object, they realize better management of the evented nature of browser environments using the following:

  • Properties
  • Computed properties
  • Observables

Properties

Templates can display properties of bound controllers using expressions. For example, the post template in the previous example will display the loaded post as:

 {{! post.hbs}} <h1>{{model.title}}</h1> <p>{{model.body}}</p> ...

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