Pass parameters to Dart Polymer element

前端 未结 3 1623
余生分开走
余生分开走 2021-01-06 00:05

The only solid example I could find for Dart Polymer doesn\'t use any parameters. How can I pass parameters to the template. Is it done through the constructor?

My s

3条回答
  •  被撕碎了的回忆
    2021-01-06 00:21

    The constructor of elements is called from Polymer and there is no way to pass parameters.

    You can as @Vloz wrote, assign values after the element was created or you can use binding as in the question you linked (Passing data to a Polymer element) using bindings.

提交回复
热议问题