Welcome to the JavaScript feedback portal. We’re happy you’re here! If you have feedback on how to improve the JavaScript, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
When we pass an object with an array of values as a member in it, the template compilation fails.
Code Snippet:
var data = [
{ name: {"x": 40}, age: [{"data1":10},{"data2":12}] }
];
var getDOMString = ej.base.compile('<ul>' +
'${if(age[1].data1 === 40)}' +
' Senior citizen ' +
'${else}' +
' normall people ' +
'${/if}' +
'</ul>');
for (var i = 0; i < data.length; i++) {
var opElem = getDOMString(data[i]);
document.getElementById('element').appendChild(opElem[0]);
}