lundi 20 avril 2015

How to access model from controller?

I can't seem to get the model from inside the controller, even though the controller seems to have a model property set. The following:

export default Ember.ObjectController.extend({
    init: function() {
        this._super();
        console.log(this.get('model'));
        console.log(this.model);
        console.log(this);
    }
}

prints out:

enter image description here

Any ideas?




Aucun commentaire:

Enregistrer un commentaire