<div>{{ time }} seconds ago</div>
<script>
Polymer('timer', {,
ready: function(){
setInterval(function(){this.time++;}, 1000)
}
});
</script>
Hi there,
I'm new to this, so if I'm not following posting guidelines very well,
apologies in advance.
I simplified this code a little bit, but you get the idea. The issue with
the code is, because setInterval() requires me to create an anonymous
function, I can't access the custom element from there.
Is there a way of reaching the custom element here? Or i there a way of
making a timing without setInterval()?
Any help would be much appreciated.
-officegunner
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/f2a2851b-aeb9-4cae-8783-9a79fdfedbac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.