jeudi 23 juillet 2015

Replacement for attribute binding syntax in Ember 2.0

Previously I could do something like this to get a two-way binding to a dynamic key:

{{my-component idBinding='content.dynamicKey'}}

In Ember 2.0 this generates a depcrecation warning:

DEPRECATION: You're using legacy binding syntax: idBinding=content.dynamicKey 
Please replace with id=content.dynamicKey

Unfortunately I cannot bind to content.dynamicKey as this will only bind to the string value and not the actual path mapping to the value.

How can I achieve the above behaviour in Ember 2.0?




Aucun commentaire:

Enregistrer un commentaire