Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在dart类中检测聚合物按钮是否已被单击_Dart_Polymer_Dart Polymer - Fatal编程技术网

如何在dart类中检测聚合物按钮是否已被单击

如何在dart类中检测聚合物按钮是否已被单击,dart,polymer,dart-polymer,Dart,Polymer,Dart Polymer,我希望能够捕捉纸张按钮上的点击事件并更改“clic me”文本 my-module.html: <dom-module id="my-module"> <template> <paper-button>{{btnTxt}}</paper-button> </template> <script type="application/dart" src="my-module.dart"></script> &

我希望能够捕捉纸张按钮上的点击事件并更改“clic me”文本

my-module.html:

<dom-module id="my-module">
 <template>
  <paper-button>{{btnTxt}}</paper-button>
 </template>
 <script type="application/dart" src="my-module.dart"></script>
</dom-module>
//Adding the 'on-tap' tag with the dart methode name attribute, can also use 'on-click'
<paper-button on-tap="btnClicked">{{btnTxt}}</paper-button>

好的,要执行此操作,您必须将其添加到以下文件中:

my-module.html:

<dom-module id="my-module">
 <template>
  <paper-button>{{btnTxt}}</paper-button>
 </template>
 <script type="application/dart" src="my-module.dart"></script>
</dom-module>
//Adding the 'on-tap' tag with the dart methode name attribute, can also use 'on-click'
<paper-button on-tap="btnClicked">{{btnTxt}}</paper-button>