Add an unbind callback to the each-* binder that unbinds all iterated views. [Closes #153]
Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -345,6 +345,8 @@ Rivets.binders = | ... | @@ -345,6 +345,8 @@ Rivets.binders = |
345 | block: true | 345 | block: true |
346 | bind: (el, collection) -> | 346 | bind: (el, collection) -> |
347 | el.removeAttribute ['data', Rivets.config.prefix, @type].join('-').replace '--', '-' | 347 | el.removeAttribute ['data', Rivets.config.prefix, @type].join('-').replace '--', '-' |
348 | unbind: (el, collection) -> | ||
349 | view.unbind() for view in @iterated if @iterated? | ||
348 | routine: (el, collection) -> | 350 | routine: (el, collection) -> |
349 | if @iterated? | 351 | if @iterated? |
350 | for view in @iterated | 352 | for view in @iterated | ... | ... |
-
Please register or sign in to post a comment