Databinding of polymer paper_input does not work

左心房为你撑大大i 提交于 2019-12-02 00:16:01

EDIT

An updated Polymer packages was just published that should fix this issue see https://groups.google.com/a/dartlang.org/forum/#!topic/bugs/-2f-TeaOoac for more details.

You need to adjust your dependency constraint to get this update because its a development release

polymer: ">= 0.11.1-dev < 0.12.0" 

EDIT END

There is an open issue for this code.google.com/p/dart/issues/detail?id=19794

Until it is fixed, you can work around it by adding an on-change event handler:

<paper-input
    label="First" floatinglabel
    error="Invalid input"

    id="first_name"
    value='{{val}}'
    on-change='{{firstNameChangeHandler}}'
    >
  </paper-input>
  void firstNameChangeHandler() {
    val = ($['first_name'] as PaperInput).value;
  }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!