Custom Events in Nested Polymer Dart UI

后端 未结 1 1485
無奈伤痛
無奈伤痛 2021-01-26 11:50

I am having some difficulty conceptualizing how to access a specific CustomEvent.

Here is my issue.

I have a name-form.html that I import in n

相关标签:
1条回答
  • 2021-01-26 12:19

    I think you should set an attribute in markup of the Element and send this value with the event details. This way the receiver receives meta data that helps to decide if he should process the event.

    like

    <name-form id='name-form' fieldname="firstname" on-nameEvent={{useModel}}></name-form>
    <name-form id='name-form' fieldname="lastname" on-nameEvent={{useModel}}></name-form>
    

    or

    <name-form id='name-form' reciever="nok-form" on-nameEvent={{useModel}}></name-form>
    <name-form id='name-form' reciever="patient-form" on-nameEvent={{useModel}}></name-form>
    
    0 讨论(0)
提交回复
热议问题