whyAto8 whyAto8 - 10 months ago 50
Javascript Question

Ember - controller not overriding inherited property

I have 2 controllers, one extending the other. I have a property called "order" defined in one of them. I need to change its value in the other controller, which extends the first one. But its not doing so.

Controller A:

define('ControllerA', function(){
var controller = Ember.Controller.extend({
return controller;

Controller B:

define('ControllerB', ['ControllerA'], function(ControllerA){
var controller = ControllerA.extend({
return controller;

This is a very minified version of both controllers. They each have different routes, which essentially show the same components, but with different data, which changes based on the

When I go to the 2nd route, i.e. B, the value of
is not being overridden (I want it to be
, but it still picks it up as

Am I missing something?

Answer Source

I realized, it was the problem in the parent controller it was inheriting from, this property was being overridden there only on model change. So, that was causing the issue.