meteor - Spacebars retrieving template from javascript -


i've migrated meteor 0.8, i'm having headache migrating handlebars spacebars.

currently in javascript function, retrieve template , put inside leaflet popup.

var marker = new l.marker(...) .addto(map).bindpopup(template.popupform({   data: data })); 

what equivalent in spacebars ?

thank you

template.name no longer returns html content, returns template object needs rendered , inserted via meteor's methods. since need pass ready dom element leaflet's method, need create intermediate div. first you'll render template div, can pass leaflet's bindpopup method.

code:

var div = document.createelement('div');  ui.insert(ui.renderwithdata(template.popupform, {   data: data, }), div);  l.marker(...).addto(map).bindpopup(div); 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -