lundi 10 août 2015

Can I still use PromiseProxyMixin with Ember.Controller?

The Ember documentation describes PromiseProxyMixin as:

A low level mixin making ObjectProxy, ObjectController or ArrayControllers promise-aware.

(Note it does not mention Controller.)

I have been using the PromiseProxyMixin in a ModalController that was originally extended from Ember.ObjectController.

Now that ObjectController is deprecated (Ember 1.11), I have converted this controller to extend Ember.Controller and it no longer works as expected.

Specifically, the properties of the object that are returned to the promise property are not automatically set in the Controller (as they were in an ObjectController.

My isFulfilled observer is still firing, but the properties that should be merged from the returned object are not set.

Aucun commentaire:

Enregistrer un commentaire