lundi 22 juin 2015

Refactoring Computed Properties on Ember.js 1.13

I was able to upgrade most of my Ember.js project to 1.13 after having some issues along the way, but now I can't wrap my head around the following deprecated code:

filteredPosts: function(){...}.property('var1','var2','var3')

When I enable it, the only notice that I receive is:

Uncaught TypeError: controllerClass.proto is not a function.

Noting that ComputedPropertyPrototype.get is the only useful information coming from the Stack Trace.

After researching around, I only found this concerning the deprecation, so I wanted to know how such code would be refactored into the native array methods or into anything that allows the same behavior.

Also, my apologies as I unfortunately cannot post an extra link to the specific file due to being a new user, so if you want to see the complete project you can head to http://ift.tt/1IZgpL3.




Aucun commentaire:

Enregistrer un commentaire