Observer on parent controller property


#1

Hi, Here is my child controller:

import Ember from 'ember';

export default Ember.Controller.extend({
    excluded: ["driverID", "vehicleID"],
    reportsController: Ember.inject.controller('reports'),

    shouldReloadModel: Ember.observer('reportsController.changeOccured', function () {
        var _this = this;
        console.log('git gere');
        Ember.$.getJSON('http://localhost:1337/someReport/get')
                .then(function (data) {
                    _this.set('model', data);
                });
    }),
});

As you can see I have that reportsController which is the parent. The issue is that ‘changeOccured’ is changing, but ‘shouldReloadModel’ is not triggered.

Please ignore any syntax issues. Is from copy / paste. The property from parent controller is changing as I have a console.log in the function that sets the property.

What I do wrong? Thanks.