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

Object controller and array controller

Ember.js provides us with two types of controllers: Ember.ObjectController and Ember.ArrayController. We have been using Ember.ObjectController in many examples throughout this book. ObjectController works on one object and ArrayController works on an array or list of objects.

When we say that ObjectController works on a single object, we mean that the model property of the corresponding route returns the single JavaScript object and not an array. You can also use the setupController hook that was discussed in the previous chapter to set the model property of the controller. The default behavior of the setupController method is to set the model property on the controller to what is returned from the model ...

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