Polymer data binding on two different elements with same property

24 views
Skip to first unread message

Udgam Mehetre

unread,
Sep 28, 2016, 11:23:22 AM9/28/16
to Polymer
Hello,

I am building a simple app with two custom elements. Main page contains two buttons, clicking one will make that custom element visible and hide the other.

In the respective elements, I've set a property ''hide'. I'm binding this hide property to two divs that contains these two elements on main page. Thus, when a user clicks one button, that element's hide gets toggled, which in turn toggles hidden$ of the div.

As expected, since both divisions are bound to same hide property, they both hide and become visible at the same time. Which I don't want to happen.

Is it possible to bind to same property value but interact with it in different ways? I know I can just use javascript and hide divisions using their ids, but is there a solution within Polymer itself?

Thank you,
Udgam
Reply all
Reply to author
Forward
0 new messages