mercredi 9 août 2017

Passing an object value to an Ember component

I have an Ember template that looks kind of like this:

= my-component [
  prices=prices ]

The prices variable is an object that looks like this:

{ standard: 0 }

If I later change prices to be, say, { standard: 50 }, the value doesn't get propagated. My my-component component still thinks the value of prices is { standard: 0 }.

Previously, the value I was passing was a scalar, and it worked fine. If I were to have price which changes from 0 to 50, the 50 value would get picked up just fine. The problem is only present when the value is an object.

How can I fix this issue?




Aucun commentaire:

Enregistrer un commentaire