0

I am using the normal way of creating html bits by combining backbone.js and underscore.js. This is an example from what I use

_.template($('#html-container').html(), this.model.toJSON());

And I append this where I need it. The model in this case is a normal backbone model.

Now the HTML that this ouputs looks like this:

<li _id="4f82f7c3c5de997ad3fd4989" code="61131" unit="100ml" op="11" rp="22" cp="0" id="4f82f7c3c5de997ad3fd4989">

Basically it created a html attribute for each variable in my Model. Is this normal or am I doing something wrong here.

Saif Bechan
  • 16,551
  • 23
  • 83
  • 125