如何在dart类中检测聚合物按钮是否已被单击
我希望能够捕捉纸张按钮上的点击事件并更改“clic me”文本 my-module.html:如何在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> &
<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>