Passing attribute to custom element in Polymer as a function -


i'm trying simple in polymer. i'm trying pass attribute using function.

<dom-module id="my-fixtures">     <template>         <fixtures-list fromdate="[[_requiredday(24)]]"></fixtures-list>     </template>     <script>         polymer({             : 'my-fixtures',             properties: {                 fromdate: string             },             _requiredday: function (offset) {                 // 1 day before                 var d = new date(new date().gettime() - parseint(offset) * 60 * 60 * 1000);                  var n = d.tojson();                 return n;             }         });     </script> </dom-module> 

but it' not working. if change function static srting value works. help?

thanks

the fromdate property should on fixtures-list not on my-fixtures

https://jsbin.com/jucevujeyo/edit?html,console,output


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -