How can I use expressions and filters in polymer 1.0?
How could I make this code snippet work?
<template>
1 + 1: <span>{{ 1+1 }}</span>
</template>
How can I use expressions and filters in polymer 1.0?
How could I make this code snippet work?
<template>
1 + 1: <span>{{ 1+1 }}</span>
</template>
Modify html like this:
1 + 1: <span>{{sum(1, 1)}}</span>
And add this function to Polymer script:
sum: function (a, b) {
return a + b;
}
Currently there’s no general support for expressions in binding annotations. (source)