meteor - Working with Template Instances -


my problem: have multiple instances of 'mytemp' template on page. when click on button inside of first instance created, 'remove me' displayed in console should. unfortunately, when click on delete button in of other instances of 'mytemp' not 'remove me' in console. don't understand why happening. how possible remove each instance clicking on it's delete button?

thanks, nathan

mytemp.html

<template name="mytemp">     <button type='button' class="btn remove">delete</button> </template> 

mytemp.js

template.mytemp.events({     'click .remove': function(e){          console.log('remove me!');     } }); 

with class code fine if use id not ids supposed unique on page.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -