Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Why Template.myTemplate.rendered created destroyed fire multiple times ? #435

crapthings opened this Issue · 2 comments

2 participants

Template['module-following-item'].destroyed = ->
    console.log 'this will fire multiple times'

maybe the events bind multiple times too ? is this normal ?

if i have 20 Template['module-following-item'], when every single template destroyed, it will execute function 20 times.


Say if i have 400 docs publish to client, and every template's function and binding event fire two times, they cause 800 executes.


That's what they're supposed to do. These callbacks are associated with a particular instance of a template on the screen, so if you display a template 400 times they each get called 400 times.

What are you trying to accomplish with these callbacks that would work better if only called once?

@glasser glasser closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.