Reputation: 2385
Polymer 1.0 supports binding to structured data using dot syntax as demonstrated below:
<template>
<div>{{user.manager.name}}</div>
</template>
In the above example, is there a way to get a <<property>>-changed
event on the user
property itself when any of it's sub-properties change? Right now, although the binding does update the sub-properties of user
, my user-changed
event listener only catches changes to the user
property itself and does not catch changes to sub-properties.
Do I have to manually configure listeners for every single sub-property of the user element in order to listen to those events?
Upvotes: 1
Views: 399
Reputation: 8848
It looks like you have to define a listener for every sub-property, though there is a shorter way to do it, by defining an observers array: Observing sub-property changes
Upvotes: 1