Skip to content
Advertisement

Tag: polymer

Conditional rendering in Polymer 3

I need to render different html based on a bool variables true or false value. For example in react I would do something like this in my return in the render function: Where I get two different output depending on the value of booleanValue. I tried in Polymer 3, and first declared my bool variable: I then try to use

Is it possible to pass a function from html into a lit-element?

I have seen examples of passing a function from a parent lit-element to a child one like here – https://medium.com/@westbrook/litelement-to-do-app-1e08a31707a4 But I want the users of my element, not to be forced to create a wrapper element to use my element. For example, my element is a dialog that computes some value. I was hoping I could do something like

multiple iron-collapse not working, expands only first

I’m trying to create multiple iron-collapse elements with content inside. I want the iron-collapse to expand when user clicks on a button. The problem is that I can’t get each element expanded individually. The script catches only first element and does not affect the others. I’ve tried many code samples but without success. Can someone help me? My code is

Advertisement