我想使用元素中定义的函数。像这样:如何在模板聚合物中使用元素函数?
<template>
<span onclick="this.parentElement.test();"></span>
</template>
<script>
Polymer({
is: 'test-ele',
test: function() {
console.log('This is a test message.')
}
})
</script>
有没有类似的方法?
<template>
<span onclick="{{{test}}}"></span>
</template>