Polymer Expressions and Filters in Polymer 1.0

How can I use Expressions and Filters in Resin 1.0?

How can I get this piece of code to work?

<template>
  1 + 1: <span>{{ 1+1 }}</span>
</template>

      

+3


source to share


1 answer


Change the html as follows:

1 + 1: <span>{{sum(1, 1)}}</span>

      

And add this function to your Polymer script:



sum: function (a, b) {
    return a + b;
}

      

There is currently no general support for expressions in annotation binding. ( source )

+9


source







All Articles