Data binding in a dynamically inserted polymer element

前端 未结 2 1050
野的像风
野的像风 2020-12-29 09:50

There\'re some times when we could need adding a custom element dynamically into a context. Then:

  • The inserted polymer could receive some properties bound t

2条回答
  •  旧时难觅i
    2020-12-29 10:40

    Right now, there is no direct way to do it. You should manually do the double binding by listening to changes in the foo property of the parent element and listening to the foo-changed event of the programmatically created element.

    
    

    You can see a working example here: http://plnkr.co/edit/mZd7BNTvXlqJdJ5xSq0o?p=preview

提交回复
热议问题