我正在尝试访问 EMBER Handlebars 模板中 polymer 组件内的纸质按钮。
这是 polymer 组件
<link href="../polymer/polymer.html" rel="import">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-new" noscript>
<template>
<paper-input></paper-input>
<paper-button>BUTTON1</paper-button>
</template>
</polymer-element>
这是我的应用程序.hbs
<my-new></my-new>
如何处理 Controller 中纸质按钮的点击事件。
最佳答案
尝试action
帮助器
按钮
<paper-button {{action "doSomething"}}>BUTTON1</paper-button>
Controller
Ember.Controller.extend({
actions: {
doSomething: function() {
}
}
})
关于javascript - 带有 Ember CLI 的 polymer ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31734329/