<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