Passing HTML via Javascript Variabele


#1

Hello,

I need to passing some HTML to a edge template via jquery I put the html in a var

ex. row='<tr><td><select>@each(product in products)<option>{{product.id}}</option>@endeach</select></td></tr>'

and adding this row via

$(’#invoiceTable’).append(row);

To a table.

The problem is that the @each is rendered as a string
and ofcoarse it does not work !

what do i have to do to let it render as a command ?


#2

hey, is it possible to view the full code of your template ?
maybe you try to render edge template on client side, not on server side