我想使用元素中定義的函數。像這樣:如何在模板聚合物中使用元素函數?
<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>