I'm trying to generate many graph on a template, my first graph is default , I'd like when I click on a zone I generate another graph who exist in a another template. How can I do that ?
I try to return my template with my other grahp.
Template.test.events({'click .zone' : function (e){
console.log("J'ai cliqué sur le template Test ... on va essayer d'ouvrir une pop up");
e.preventDefault();
//$('#animalsModal').modal('show');
return {template: Template[createGraph]};
}});
You can use Template.dynamic for this purpose.
//html
//JS