How do I access data in array using javascript TEMPO -
been searching day , still stuck on trying access data array object using tempo.tried using variety of processes not getting anywhere.
the array object i'm trying access called options , key name.
<p>{{options:name}}</p>
it's kind of difficult answer without @ least on instance of array object. suppose have this:
var data = {options:[ {name:'test name'}, {name:'another test name'} ]}
just assign options array data method after prepare in tempo:
tempo.prepare('container').data(data.options);
and in html:
<div id="container"> <p data-template>{{name}}</p> </div>
Comments
Post a Comment