Using Typeahead-Bloodhound bundle, I've created a custom suggestion template. I'm trying to figure out what object the template is calling to compile a variable. I'm using Underscore instead of the {{}} templating:
_.compile( '<p><strong><%=PN%></strong> <span class="tt-suggestion-etc"> <%=A2 %>| LAT: <%=Y%> LON: <%=X%></span></p>' )
If this were the standard Typeahead brackets:
compile( '<p><strong>{{PN}}</strong> <span class="tt-suggestion-etc"> {{A2}}| LAT: {{Y}} LON: {{X}}</span></p>' )
I want to be able to access the actual object property via javascript in Underscore, like so:
_.compile( '<p><strong><%=PN%></strong> <span class="tt-suggestion-etc"> <% if(someObj.someProp !== undefined ){ // do something }else{ //do something else } %>| LAT: <%=Y%> LON: <%=X%></span></p>')